Hi guys
I'm trying to get my form to only allow people to return the form (via email) once they have accepted the terms and conditions AND the privacy policy.
Their acceptance of these is confirmed by 2 check boxes called acceptservicesterms and acceptprivacypolicy respectively. For each of these check boxes I have added this script to 'initialise':
this.mandatory = "error";
this.mandatoryMessage = "You must accept our Services Booking Terms and Conditions to request a booking";
I have then set my email submit button (EmailSubmitButton) to 'hidden (exclude from layout)' and created a 'fake' email submission button in its place. The click event for the FakeEmailSubmitButton is scrpited as:
if (acceptserviceterms.rawValue != "bookingtermsagreed")
{
xfa.host.messageBox("You must accept our Services Booking Terms and Conditions to request a booking");
}
else if (acceptprivacypolicy.rawValue != "privacypolicyagreed")
{
xfa.host.messageBox("You must accept our Privacy Policy to request a booking");
}
else
{
EmailSubmitButton.execEvent("click");
}
Where the 'on' values are 'bookingtermsagreed' and 'privacypolicyagreed' respectively.
Unfortunately, this hasn't worked for me - I'm not sure if the javascript is completely correct, or if I have gone about this the right way. Can anyone shed any light on what I've done wrong please?
Thanks in advance
Solved! Go to Solution.
Views
Replies
Total Likes
if (acceptserviceterms.rawValue != "bookingtermsagreed")
in this line the field name is acceptservicesterms but u typed as acceptserviceterms - letter s missing.
after this correction i am able to see the error messages.
Views
Replies
Total Likes
if (acceptserviceterms.rawValue != "bookingtermsagreed")
in this line the field name is acceptservicesterms but u typed as acceptserviceterms - letter s missing.
after this correction i am able to see the error messages.
Views
Replies
Total Likes
Thanks Raghu
I guess that I had looked at it for so long that I couldn't see the obvious!
Thanks for spotting this for me...
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies