Hi,
I have a couple of forms that are working fine, but I need to add a few hidden fields to each for tracking purpouses.
Do I just add the HTML for the hidden fields from within the form code tab/screen?
How will CF be able to save the data from these new fields into it's DB table?
Many thanks,
- Vince
I have a couple of forms that are working fine, but I need to add a few hidden fields to each for tracking purpouses.
Do I just add the HTML for the hidden fields from within the form code tab/screen?
How will CF be able to save the data from these new fields into it's DB table?
Many thanks,
- Vince
Hi Vince,
Just add them to the Form HTML in the Form Code tab. Provided that the field names match column names in the database table ChronoForms will save the data OK (the names must match exactly).
Bob
Just add them to the Form HTML in the Form Code tab. Provided that the field names match column names in the database table ChronoForms will save the data OK (the names must match exactly).
Bob
Hi Bob,
These hidden fields are new, and do not exist in the current DB.
Hence similar to when we create a new form with CF and it creates all the necessary fields, but this time we are adding new to an existing form. I was wondering if that was the purpous for the 'update SQL' button?
At worst, would I have to create a totally new form with the extra fields, and delete the old form?
Only problem with that is the previous data would not be in the new form for stats.
Thanks,
- Vince
These hidden fields are new, and do not exist in the current DB.
Hence similar to when we create a new form with CF and it creates all the necessary fields, but this time we are adding new to an existing form. I was wondering if that was the purpous for the 'update SQL' button?
At worst, would I have to create a totally new form with the extra fields, and delete the old form?
Only problem with that is the previous data would not be in the new form for stats.
Thanks,
- Vince
Hi Vince,
Add the new columns to the database table and it will work OK.
The 'Update SQL' link is to upgrade the ChronoForms tables when there is a change after an extension upgrade. No use to you here.
Bob
Add the new columns to the database table and it will work OK.
The 'Update SQL' link is to upgrade the ChronoForms tables when there is a change after an extension upgrade. No use to you here.
Bob
OK, understood.
So now I've created the new fields, all that remains is to populate them :-)
Problem is, that the code I need to use to populate the hidden fields has this:
The key part being
onSubmit="populateHiddenFields(this);"
I have attempted to add this in various places near the end of the form code, but no dice.
This is the end code I have right now.
Any ideas?
Many thanks,
- Vince
So now I've created the new fields, all that remains is to populate them :-)
Problem is, that the code I need to use to populate the hidden fields has this:
<form method="POST" name='contactform' onSubmit="populateHiddenFields(this);">
The key part being
onSubmit="populateHiddenFields(this);"
I have attempted to add this in various places near the end of the form code, but no dice.
This is the end code I have right now.
<td></td><td><input name="submit" value="Submit" type="submit"></td>
Any ideas?
Many thanks,
- Vince
Hi Vince,
Put the snippet in the Form Tag Attachment box on the Form General Tab - ChronoForms will then put it in the Form tag.
Bob
Put the snippet in the Form Tag Attachment box on the Form General Tab - ChronoForms will then put it in the Form tag.
Bob
Bob,
You're the man!
I didn't even notice that option in CF.
Worked perfect.
Thank you again, very much.
- Vince
You're the man!
I didn't even notice that option in CF.
Worked perfect.
Thank you again, very much.
- Vince
Add the new columns to the database table and it will work OK.
How do you do that? Can it be done in Chronoforms?
How do you do that? Can it be done in Chronoforms?
This topic is locked and no more replies can be posted.