Posted by Tom
2014-03-08
Hi Steve,
I assume you are converting a text input box to a hidden input. Let's use "first_name" as an example. Find the following php tag in form/tpl.(table-name).reg_page2.inc.php
I assume you are converting a text input box to a hidden input. Let's use "first_name" as an example. Find the following php tag in form/tpl.(table-name).reg_page2.inc.php
<?php echo $hm->Zb('rs:def:first_name'); ?>Replace it with
<input type='hidden' name='rs:def:first_name' value='John' />When you submit the form, the script will put 'John' into the database. Change 'John' to anything you want.
→ Form2DB
I experimented by adding standard HTML code for a hidden input, and referencing the new field in the database I created for this, but the hidden input value doesn't get added. Since I'm not a PHP programmer, I'm not sure how to do this.
Seems I need to not use standard HTML for this, instead use the PHP statement in tpl.form.reg_page1.inc.php and modify it to pass on a set value. i.e.,:
// <?php echo RSTR2_NAME_OF_NEW_HIDDEN_INPUT; ?>
... and somehow append the set value to that. (??)
Thanks for any help.
Steve