Conditionally Change the $formModel property from insert to update in the php form plugin

sportegioco

New Member
I have a table where I insert data. ... but if in a table row I find an email equal to that inserted in the form I would like to update this record, but not through my query, but directly from the form.

My first query:
$myrowid = Select id from utenti where email = myformemail

if ( $myrowid == '' ) {
//insert row by form model
return;
} else{
//something like this
$formModel->updateFormData('utenti ___ id'), (int)$myrowid, true);
//or this
$formModel->updateFormData('__ pk_val'), (int)$myrowid, true);

//and update row by form model
return;
}

Thank you
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top