Expand my Community achievements bar.

How to show a text field based on what is entered in a date field

Avatar

Level 1

Hi there LiveCycle experts!

I have a form with a text field that I want to show only if the value of the previous date field once entered is less than 1 month from today?

Any help appreciated, been researching in vain for hours!!!

Sarah

3 Replies

Avatar

Former Community Member

The attached displays the field 'txtField' if the entered date is less than the current date plus 30 days. I used separate and visible date fields and date number fields to highlight the capture and creation of date numbers. The date numbers are used to determine the visibility of the text field. You could merge the code to create the current date plus 30 day date number into a single hidden field.

Untitled.png

// form1.page1.enteredDate::exit - (FormCalc, client)

if (HasValue(enteredDate)) then

  enteredDateNum.rawValue = Date2Num(enteredDate.formattedValue, "MM/DD/YYYY")

  if (enteredDateNum.rawValue < currentDatePlus30Num.rawValue) then

    form1.page1.txtField.presence = "visible"

  else

    form1.page1.txtField.presence = "hidden"

  endif

endif

Steve

Avatar

Level 1

Wow Steve - thanks so much this is so exciting I just love learning these new scripts.

I assume I need to make the text field 'Hidden' - ?

I seem to be struggling a little to get it working - are you able to have a quick squizz at my document - it is in the very early stages!

Regards,

Sarah Milne

FACEBOOK : Join our  'BritBound Social Events' Group on Facebook to receive details of forthcoming social events...click here to join. 

  

For a sociable & stress free arrival experience!

BritBound London Office: Britain & London Visitor Centre, 1 Regent Street, London, SW1Y 4XT.

Tel UK: | 0845 450 3536 | From OS + 44 (0) 20 7808 3815

Tel OZ: | Sydney: (02) 8003 7651  | Melbourne: (03) 9005 8304 | Brisbane: (07) 3102 9766

Tel NZ: | Auckland: (09) 889 3175 | Wellington: (04) 889 2015   | Christchurch: (03) 669 2032

Website:        www.britbound.co.uk

E-mail:           sarah@britbound.co.uk

Click Here to find out more about: | UK VISAS  | MOBILE PHONE CONTRACTS FOR NEW ARRIVALS TO THE UK  |  UK ACCOMMODATION  |  AIRPORT TRANSFERS  |  UMBRELLA COMPANIES   |  DISCOUNTED INTERNATIONAL BANK TRANSFERS  |  SOCIAL EVENTS   |  TAX REFUNDS  |  NATIONAL INSURANCE (NI) NUMBERS

 

Disclaimer: The information contained in or attached to this message is intended only for the people it is addressed to. If you are not the intended recipient, any use, disclosure or copying of this information is unauthorised and prohibited. This information may be confidential or subject to legal privilege. BritBound cannot accept liability for any virus damage caused by this message. This documentation is for your general information, and is not to be construed as advice. Clients should not act on the information contained herein alone, and should seek independent advice if necessary.

Avatar

Former Community Member

Sure. Forward the form to stwalker.adobe@gmail.com

Steve