/ Id-Extras Forum / Output code broken for Time input

  • Author
  • #8013 Reply
    Shumi Debnath
    Participant

      Using FormMaker, I’m working on a form where people need to input information in one section of the PDF and what they have entered must appear in a separate section of the PDF. Everything is working well (check attached screenshot), except for the section where they need to select their time. They can select it, but the information isn’t showing up in the output field. Any suggestions to fix our code?

      Here’s our code:

      *****Input start hour***** (used to be dividers of the codes)

      Name: toggle.start_hour

      Actions:
      On Blur
      Run Javascript
      event.target.fillColor=color.transparent;

      On focus
      Run Javascript
      event.target.fillColor=[“G”, 0.875];

       

      *****Input start minute*****

      Name: toggle.start_minutes

      Actions:
      On Blur
      Run Javascript
      event.target.fillColor=color.transparent;

      On focus
      Run Javascriptevent.target.fillColor=[“G”, 0.875];

       

      *****Input start period*****

      Name: toggle.start_period

      Actions:
      On Blur
      Run Javascript
      event.target.fillColor=color.transparent;

      On focus
      Run Javascript
      event.target.fillColor=[“G”, 0.875];

       

      *****Input end hour*****

      Name: toggle.end_hour

      Actions:
      On Blur
      Run Javascript
      event.target.fillColor=color.transparent;

      On focus
      Run Javascript
      event.target.fillColor=[“G”, 0.875];

       

      *****Input end minute*****

      Name: toggle.end_minutes

      Actions:
      On Blur
      Run Javascript
      event.target.fillColor=color.transparent;

      On focus
      Run Javascript
      event.target.fillColor=[“G”, 0.875];

       

      *****Input end period*****

      Name: toggle.end_period

      Actions:
      On Blur
      Run Javascript
      event.target.fillColor=color.transparent;

      On focus
      Run Javascript
      event.target.fillColor=[“G”, 0.875];

       

      *****Input end period*****

      Name: toggle.tz_picker

      Actions:
      On Blur
      Run Javascript
      event.target.fillColor=color.transparent;

      On focus
      Run Javascript
      event.target.fillColor=[“G”, 0.875];

       

      *****Output time*****

      Name: user.selected_time_calc

      Calculate:

      Custom Calculation Script
      var tmpColor = [“CMYK”,0,1,0.4068,0.0745]; var activeColor = [“RGB”,0/255,47/255,108/255]; var typeSize = 9; var eventBody = this.getField(“toggle.event_body”).valueAsString; var cSHour = this.getField(“toggle.start_hour”).valueAsString; var cSMinute = this.getField(“toggle.start_minutes”).valueAsString; var cSPeriod = this.getField(“toggle.start_period”).valueAsString; var cEHour = this.getField(“toggle.end_hour”).valueAsString; var cEMinute = this.getField(“toggle.end_minutes”).valueAsString; var cEPeriod = this.getField(“toggle.end_period”).valueAsString; var cTZ = this.getField(“toggle.tz_picker”).valueAsString; if(cSHour !== “–” && cEHour !== “–“) { event.target.display = display.visible; event.value = cSHour + cSMinute + ” ” + cSPeriod + ” – ” + cEHour + cEMinute + ” ” + cEPeriod + ” ” + cTZ; event.target.textColor = activeColor; event.target.textSize = typeSize; } else { event.target.display = display.noPrint; event.value = “XX:XX AM – XX:XX PM TZD”; event.target.textColor = tmpColor; event.target.textSize = typeSize; }

       

      #8014 Reply
      Ariel
      Keymaster

        Hi Shumi,

        I think it would be helpful for me to see the actual PDF.

        Can you post it here, or send it to me privately?

        Thanks,

        Ariel

        #8015 Reply
        Shumi Debnath
        Participant

          Hey Ariel,

          Yes of course! I would have uploaded the PDF, but I don’t seem to see an option for that, so here’s a link to download: https://drive.google.com/file/d/1qdWmAslXJCrz4sjZFa6ITL8otFprRAWB/view?usp=sharing

        Viewing 3 posts - 1 through 3 (of 3 total)
        Reply To: Output code broken for Time input
        Your information: