change from "User Entered - Required" to "User-entered - Optional"

36 views
Skip to first unread message

mhw

unread,
Dec 8, 2021, 5:47:08 PM12/8/21
to Adobe LiveCycle Developers
Hello, I am developing a form in which, depending on the scenario (i.e. content of some fields), some other fields should switch from "User Entered - Optional" to "User-entered - Required", and back  from "User Entered - Required" to "User-entered - Optional".

I could render a field mandatory (i.e. User Entered - Required) using the script 
AnyField.mandatory = "error";

However, I can't find how to to reverse back to "User-entered - Optional".
Would you know how to do it ? ... or where I should look for it?
Thx

Adam D.

unread,
Dec 8, 2021, 5:49:58 PM12/8/21
to live...@googlegroups.com
Have you tried it woth "optional" if null or not null? Or may need to use an oncexot if condition on enter / reenter



- Adam
--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to livecycle+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/livecycle/5d62eede-d526-4040-93cc-e9e5bada5b0fn%40googlegroups.com.

mhw

unread,
Dec 9, 2021, 12:00:26 PM12/9/21
to Adobe LiveCycle Developers
apparently, the following seems to be doing the trick.
     TextField1.mandatory = "";

Adam

unread,
Dec 9, 2021, 12:03:10 PM12/9/21
to live...@googlegroups.com
Good stuff. I found using ifs / nots null or """ etc. Work well for the types of fields you are working with. Sometimes they need to go on exit or enter events to trigger.

--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to livecycle+...@googlegroups.com.

fred.pantalone

unread,
Dec 10, 2021, 9:35:43 AM12/10/21
to Adobe LiveCycle Developers
The actual value to set is "disabled" which is the default and that is why setting that attribute to an empty string has the same effect. A simple method (when you don't feel like RTFM) to learn these values is to create a script that displays the value at run-time (e.g. on a button click):

app.alert("mandatory: " + TextField1.mandatory);

mhw

unread,
Dec 11, 2021, 5:14:09 PM12/11/21
to Adobe LiveCycle Developers
Great. Thanks.

Dhivagar R

unread,
Dec 23, 2021, 5:26:55 AM12/23/21
to live...@googlegroups.com
Hi

Can anybody help me.
I have issues in the form template group.
Can somebody help me



--
With regards
Dhivagar R
SAP Business ByDesign Developer
Indus Novateur Softech Pvt Ltd
Near Rathinam College
Eachanari, Coimbatore 641021





Reply all
Reply to author
Forward
0 new messages