Hi Experts,
I have a requirement of marking conditionally reqd fields with red asterisks based on certain fields getting populated.
Please refer to the attachement - currently am able to mark with asterisk but not able to change the color of the asterisk from black to red.
I have 2 text fields named Bank Account Number & Payment Method
Payment Method is mandatory if Bank Account Number is populated - that means we require a red asterisk in the caption for Payment Method
Script inserted
MASTER.page1.bankAccNr::mouseEnter - (JavaScript, client)
paymentMethod.caption.value.text
= "Payment method * ";
MASTER.page1.bankAccNr::mouseExit - (JavaScript, client)
paymentMethod.caption.value.text
= "Payment method";
Views
Replies
Total Likes
There was another thread with the similar question answered.. That will help you..
http://forums.adobe.com/thread/601932?tstart=30
Thanks
Srini
Views
Replies
Total Likes
Thanks for the link - provided some way fwd in cracking the problem
I dont have any checkboxes - simply if the bank account is filled, payment method is mandatory
I tried putting the script provided by steve (as given in the link) in the exit event of the Bank Account Field it doesnt work.
Also I dont need the whole caption color to change only the asterisk (indicator for mandatory fields) to be in red color the rest of the caption should in default black color.
Please let me know
Regards.
Rohit
Views
Replies
Total Likes
I have put in a sample file for you to check. I am checking the field value in the Exit event and if the value is not in I am changing the * color to Red otherwise I am keeping it as black color.
To change only part of the caption to be in different color you need to use rich text coding.
The easier way to acheive this is to keep the entire caption in a separate Text object and then place the * in the caption with the TextField object (as I did in my sample). This way the Text object text is always in black color and the TextField object will change the * color based on the value in it.
https://acrobat.com/#d=*Ke-9B3ajEN2dpyuhOO31g
Hope this helps.
Thanks
Srini
Views
Replies
Total Likes