<div dir="ltr">Hi,<div><br></div><div>Yes, we can use the field-names as name of the html elements. So on form submit these name will be mapped to entity database field-names. Please look at (modules/Vtiger/actions/Save.php) file for api getRecordModelFromRequest(). where we are mapping field-model field-value to request field-value.</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 6:36 PM, kkoci <span dir="ltr"><<a href="mailto:kristian.koci@gmail.com" target="_blank">kristian.koci@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Forgive me if this is a noob question, I'm just broadening my depth of<br>
vtiger development knowledge...<br>
<br>
I need to insert data into a vtiger table, from a jquery code i'm doing for<br>
a module.<br>
<br>
To do that, i'm declaring all the fields on the manifest.xml , in the<br>
<sql></sql> section... Now, my question is:<br>
<br>
Should i give the same names I did in the manifest file, to the jquery form<br>
fields so automatically will save records into database?<br>
<br>
Or should I do something else?<br>
<br>
For example I have this on my Detail and List and Edit TPL's.<br>
<br>
<!DOCTYPE html><br>
<html><br>
<head><br>
</head><br>
<body><br>
<div id="clonedInput1" class="clonedInput"><br>
        <div class="actions"><br>
        <button class="clone">Agregar pago</button><br>
        <button class="remove">Quitar pago</button><br>
    </div><br>
    <div><br>
        <label for="txtCategory" class="">Metodo *</label><br>
        <select class="" name="txtCategory[]" id="metodo"><br>
            <option value="">Cheque</option><br>
                        <option value="">Efectivo</option><br>
                        <option value="">Credito</option><br>
        </select><br>
        <label for="txtCategory" class="">Referencia </label><br>
            <input type="text" name="referencia"><br><br>
                <label for="meeting">Fecha de pago : </label><input id="meeting"<br>
type="date" /><br>
                <label for="txtCategory" class="">Impuestos</label><br>
                        <input type="text" name="impuestos"><br><br>
    </div><br>
</div><br>
<br>
<link href="html2.css" rel="stylesheet"><br>
<br>
<br>
<br>
</body><br>
</html><br>
<br>
There's 'referencia' 'impuestos' and 'metodo' as id's and names of the<br>
fields, should it be enough with this? By adding them the same names or id's<br>
of the tables declared into manifest.xml?<br>
<br>
Should I do something more?<br>
<br>
What could that would be? Any example?<br>
<br>
I hope I've explained myself, Any help would be greatly appreciated, Thanks<br>
in advance!<br>
<br>
PS = I've seen some JQuery examples that use serializeArray() but i have no<br>
idea if i can use that inside a vtiger module, or how to map it into a<br>
vtiger table.<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtiger-crm.2324883.n4.nabble.com/Insert-into-db-from-jquery-layout-template-tp11259.html" target="_blank">http://vtiger-crm.2324883.n4.nabble.com/Insert-into-db-from-jquery-layout-template-tp11259.html</a><br>


Sent from the vtigercrm-developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">With<br>Best Regards<br>Uma.S<br><div>Vtiger Team</div></div>
</div>