Jump to content
Larry Ullman's Book Forums

Create_Form_Input


Recommended Posts

I'm using something very similar to this function to create a form, passing 4 arguments

function create_form_input($name, $type, $errors, $label)

 

I was under the impression that the last argument could be optional. I am using it to set an id for the select fields in my forms but do not need it for the text fields.

<td><label for="moderation">Moderation</label></td>
<td><?php create_form_input('skillLevel', 'select', $survey_errors, 'moderation')?></td>

When I run the script, I get an error message for every field which has not passed the 4th argument - 'missing argument 4 for create_form_input(). Are all arguments mandatory, or how do I make it optional?

Link to comment
Share on other sites

 Share

×
×
  • Create New...