Welcome Guest, Not a member yet? Register   Sign In
Form helper - set ID as well as name?
#1

[eluser]Unknown[/eluser]
'lo all,
Just about to start using CodeIgniter - have played with examples / tutorials etc. and am liking it - first time I've ever managed to get my head around this sort of programming and I'm enjoying myself.

I do, however, have a question - the form helper can be used to create different types of inputs but the code that is output only specifies the input NAME - <input type="text" name="x" /> - I also want each field to have an ID so it can be referenced by JavaScript, or form labels etc: <input type="text" name="x" id="x" />

I know I can do this using an array of options when I call the helper functions - but ID is so necessary in forms I would prefer to do this automatically if possible.

Can it be done - maybe by modifying the form helper or something?




Theme © iAndrew 2016 - Forum software by © MyBB