cancel
Showing results for 
Search instead for 
Did you mean: 

reg: Mandatory field

Former Member
0 Kudos

Hi,

I have a input field which should be made mandatory. I have set the state property as required. But i am not getting the required result. Is this the way to do that?

Kindly suggest

Thanks.

Edited by: jyothi beera on Mar 23, 2009 8:11 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes it should be correct.

However do note that you need to have codings to display the appropriate error message.

Answers (2)

Answers (2)

pravesh_verma
Active Contributor
0 Kudos

Hi Jyothi,

Setting teh input fields mandatory does not set the manadatory functionality. it will not check for any kind of validation. It will just provide the labels of the input field with the astrick mark in red, which denotes that this is a mandatory field.

Please check the link which Satish has given, you have to write a code to check for the mandatory attributes. In the same link I have mentioned the way to access the attributes of the nodes. You need to check for those attributes which you are setting as mandatory.

After that you can raise a Exception as well to highlight that input field. Please refer to this code snippet to raise the context exception which will make the input field red in which you will put the mandatory check:


wdThis.wdGetAPI().getComponent().getMessageManager().reportContextAttributeMessage(attribute, message, args)

Also refer to these links:

Here I have already mentioned the way to report the context exception.

Thanks and Regards

Pravesh

former_member185086
Active Contributor
0 Kudos

Hello Jyoti

Yes ,there making field mandatory is compulsory as well as some coding is required to get proper message and all

read this thread for further [help|; which contain proper and detailed solution of this kind of issue

Best Regards

Satish Kumar