CodeIgniter Forums

Full Version: help with form_input()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

The documentation says that to populate form field with form_input() - use:

'value' => 'enter your login id', in the array.

Also to repopulate fields in case of error in entry - we are supposed to do:

'value' => set_value('login'),

I basically want to do both -

i;e - before the user enters anything - the form field should display - "enter your user id" but supposedly he enters wrong details - the form should then be repopulated with the entered data.

How to do this ? thanks

El Forum

read about the 2nd parameter to set_value() Smile

El Forum

With html5 there's an attribute called placeholder that you might want to look into.

El Forum

thanks set_value()2nd parameter worked..