Forums

[SOLVED] replace values in db table

gianfrancocaliri 21 Dec, 2012
Good evening,
I managed to create a table in the joomla database connected to a form. Yeeeh! :mrgreen:
Now I want to replace the values ​​in this table by overwriting, not adding additional rows.
How can I do, please?
Thank you very much.

gianfranco caliri
GreyHead 21 Dec, 2012
Hi gianfranco,

You need to make sure that you have the value of the Primary Key (usually the first column 'id' or 'cf_id') of the record that you want to update in your form data. The simplest way to do this is to add it to a hidden input in your form.

Bob
gianfrancocaliri 21 Dec, 2012
wow!
simple and effective! 😀
now ... but how do I hide the field in the form? 😶
in configuration, other, I only have the ability to hide the label, but not the field.
Thanks again and see you soon for a beer! 🙄
gianfranco
gianfrancocaliri 22 Dec, 2012
[SOLVED]

style="display:none;">cf_id</label><input type="hidden" id="cf_id" maxlength="1" size="1" class="cf_id" title="cf_id" type="text" value="1" name="cf_id" />

😀

I am a beginner ... thanks again for the help!

gianfranco
GreyHead 22 Dec, 2012
Hi gianfranco,

The ChronoForms Wizard has a 'Hidden Box' in the Advanced Elements Group.

Bob

PS And because it's hidden you can just leave out the label and any other HTML apart from the input itself.
<input type="hidden" id="cf_id" value="1" name="cf_id" />
In particular, make sure you only have one type='hidden' attribute or some browsers might get upset.
This topic is locked and no more replies can be posted.