How to refer to a questionID on a form
Permalink
Hello. I have this code on my external form template:
And then this code is part of a function in my template's controller:
This updates a user's attribute. I'd like to try something different on a regular form though. Rather than trying to refer to a question label that's hardcoded, how would I refer to a question label that is automatically generated by the standard form block? If I use firebug, a question might be identified as "Question4." How would I refer to that in my second snippet of code so that the proper user attribute will be updated?
<?php echo $form->text('model_name')?>
And then this code is part of a function in my template's controller:
$ui->setAttribute("model_name", $this->post('model_name'));
This updates a user's attribute. I'd like to try something different on a regular form though. Rather than trying to refer to a question label that's hardcoded, how would I refer to a question label that is automatically generated by the standard form block? If I use firebug, a question might be identified as "Question4." How would I refer to that in my second snippet of code so that the proper user attribute will be updated?