PDA

View Full Version : How to update 'instructions' of a fieldset.



ssdesign
7 Aug 2010, 7:43 AM
Hi,
Is there a possibility to update the 'instructions' of a fieldset?

For example, the instruction could be:
Please enter username.

On entering wrong username, the instructions update to say:
Wrong username, please try again.

Something like that.

I cant find 'setInstructions' or similar method in the docs.

Any help?

Thanks a lot.

ssdesign
7 Aug 2010, 8:08 AM
I am able to read value of instructions like this:

alert('formBase.items[0].instructions');

but cant figure out how to change its value.

kevchuey
7 Aug 2010, 9:35 AM
I don't have the javascript infront of me, but you could probably take a look in the FieldSet.js source code to see how they set it during configuration time and replicate the code...

evant
8 Aug 2010, 8:05 PM
fieldset.instructions.setHTML('foo');