[Vtigercrm-developers] Insert into db from jquery layout/template

kkoci kristian.koci at gmail.com
Fri Jul 4 13:06:10 GMT 2014


Hi, Forgive me if this is a noob question, I'm just broadening my depth of
vtiger development knowledge...

I need to insert data into a vtiger table, from a jquery code i'm doing for
a module.

To do that, i'm declaring all the fields on the manifest.xml , in the
<sql></sql> section... Now, my question is:

Should i give the same names I did in the manifest file, to the jquery form
fields so automatically will save records into database?

Or should I do something else?

For example I have this on my Detail and List and Edit TPL's.

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="clonedInput1" class="clonedInput">
	<div class="actions">
        <button class="clone">Agregar pago</button> 
        <button class="remove">Quitar pago</button>
    </div>
    <div>
        <label for="txtCategory" class="">Metodo *</label>
        <select class="" name="txtCategory[]" id="metodo">
            <option value="">Cheque</option>
			<option value="">Efectivo</option>
			<option value="">Credito</option>
        </select>
	<label for="txtCategory" class="">Referencia </label>
            <input type="text" name="referencia"><br>
		<label for="meeting">Fecha de pago : </label><input id="meeting"
type="date" />
		<label for="txtCategory" class="">Impuestos</label>
			<input type="text" name="impuestos"><br>
    </div>
</div>

<link href="html2.css" rel="stylesheet">



</body>
</html>

There's 'referencia' 'impuestos' and 'metodo' as id's and names of the
fields, should it be enough with this? By adding them the same names or id's
of the tables declared into manifest.xml?

Should I do something more?

What could that would be? Any example?

I hope I've explained myself, Any help would be greatly appreciated, Thanks
in advance!

PS = I've seen some JQuery examples that use serializeArray() but i have no
idea if i can use that inside a vtiger module, or how to map it into a
vtiger table.




--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Insert-into-db-from-jquery-layout-template-tp11259.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list