cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a field as Mandatory dynamically based on certain condition

Former Member
0 Kudos

Hi All -

I am working on ADOBE Interactive forms. I am not able to find out, How to set a particular field as a 'Mandatory field' based on some condition. I am using FormCalc as scripting language.

i.e: I have a field "RATING". I want to make the next field "COMMENT" as mandatory when "RATING" is less than 3.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vishal,

Check if Ratting it is greater than 3 then set "error" value to the "mandatory" property ( for making field mandatory) else set the "disabled" value to mandatory property( for making field optional ).

$.mandatory = "error"

Regards,

Vikram

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Vikram/Rose.

Former Member
0 Kudos

Hi Vishal,

You need to set the mandatory attribute of the specific field according to your condition. In FormCalc this will be similar to this,

if (Rating < 3) then

$.mandatory = "error"

$.mandatoryMessage = "The corresponding Comment field is mandatory. Please fill"

else

$.mandatory = "disabled"

endif

The mandatory property can be set as:

"error" : Makes the field compulsory to be filled before submission

"disabled" : Makes the field optional

"warning" : Gives a warning to the user that the field should be filled, but doesn't cause an error on submission

The property "mandatoryMessage" specifies the message to be displayed to the user when the mandatory field isn't filled before submission.

Regards,

Rose

Former Member
0 Kudos

Hi Vishal,

What type of scenario are you building your Adobe form in? ABAP WebDynpro... Java Web Dynpro, or HCM Processes and Forms?

Cheers,

Kevin