1 Reply Latest reply on Feb 5, 2018 5:13 PM by MinusZero

    LiveCycle ES4: FormCalc or Java Script-Trying to create a conditional caption script based on other object value

    trodg80 Level 1

      Hello all,


      I need some help. I think my issue is with Syntax as this is the first time I have ever tried to make a conditional caption. I am currently trying to do it in FormCalc as I am a little more familiar with that syntax than I am Java but I am willing to explore both.


      The Desired Result:

      I have a set of Radio Buttons that the form user should select to identify what type of hire they are trying to submit. Based on the radio button selection, the caption on a date field needs to read something different (to cut down on space usage on the form).



      The Radio Buttons are Value Bound to 1="Rehire", 2="Temp to Perm" and 3="New Hire" in a Radio Button Group called HireType. The Date field is a standard date field with Size 9 Arial 9 titled StartDate.


      Important Note: I am not using any kind of outside data source (XML or otherwise) to populate this information. Most of the subject matter I have been able to find about conditional captions references back to this. The form that I am designing is completely internal unto itself.


      The FormCalc script I tried on the exit event for the HireType radio button group:

      form1.#subform[0].HireType::exit - (FormCalc, client)

      if (HireType.rawValue=="1")then

      StartDate.caption.value="Original Hire Date"


      StartDate.caption.value="Temp Start Date"



      The Result:

      Nothing happens. I am pretty sure the solution is starting me right in the face, but this is the first time I have tried to do a conditional script with anything except the raw value of a field or the Drop Down List selection.


      Any help would be greatly appreciated! Again willing to explore Java or FormCalc solutions.


      Thanks in advance!