Expand my Community achievements bar.

SOLVED

Update Date on SAVE or PRINT (IF Statement)

Avatar

Former Community Member

Hi,

I am currently designing a booking form for my company.

(Link is http://www.sigmastudies.co.uk/downloads/booking_form.pdf)

I have made a date field at the top of the booking form which is based on an IF statement in FormCalc when the form loads to load the current date if blank.

Although, what I want to do is for this IF statement only to come into action when the SAVE or PRINT button is pressed at the bottom.

This would obviously then enable a user to go into the form and have a look before filling it out (... and then saving or printing) without the date updating itself never to update again.

I am struggling as the SAVE/PRINT button are written in javascript yet the IF statement and date  is written in FormCalc.

I appreciate any help anyone can offer,

Thanks

Will

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Will,

You can make the field invisible. So that the user can not see it.In the click event of save and print you can the following code to make it visible.

form1.Page1.Wrapper.BookingForm.Date.presence = "visible";

I did nothing just after developing form instead of saving I did the "SaveAs" operation. Generally SaveAs operation reduces the file size a bit.

Thanks.

Bibhu.

View solution in original post

4 Replies

Avatar

Level 9

Hi Will,

Here is a link . Try this one . https://acrobat.com/#d=7uG5d8zBFTgU9d68QX1H-A.

Here, instead of putting the If statement to show the date in the layout ready event I have put it in the click event and calling the same event in the click event of Save and Print button.

Thanks.

Bibhu.

Avatar

Former Community Member

Hi Bibhu,

Thanks for your fast and great help!!!

It works a dream.

Although, can I stop the event occurring if someone was to accidently click the date field at the top of the page??

Also, how did you manager to decrease the file size.

ALL LOOKS GOOD

Thanks

Will

Avatar

Correct answer by
Level 9

Hi Will,

You can make the field invisible. So that the user can not see it.In the click event of save and print you can the following code to make it visible.

form1.Page1.Wrapper.BookingForm.Date.presence = "visible";

I did nothing just after developing form instead of saving I did the "SaveAs" operation. Generally SaveAs operation reduces the file size a bit.

Thanks.

Bibhu.

Avatar

Former Community Member

TOP MAN!!!

Why didnt I think of that lol.

Thanks for your help Bibhu,

Will