How to refer to a questionID on a form

Permalink
Hello. I have this code on my external form template:

<?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?

edenxavier
 
jbx replied on at Permalink Reply
jbx
Probably wouldn't be too difficult though. You could grab the question and parse it to ensure it was safe to use for the field name. Then your controller could always reference exact questions...