Jump to content

Fbizzzzle

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Fbizzzzle

  1. I am unable to get this to work.

    Is there something I am missing with the syntax to reference the fields?

    <script>
    
    document.addEventListener('DataPageReady', function (event) {
     
     var x10  = document.querySelector('[id=cbParamVirtual1]');
       x10.onchange = function() {
      document.getElementById('TrackerAdopterInterestedDog1ID_FK').value = document.getElementById('cbParamVirtual1').value;
      document.getElementById('TrackerAdopterInterestedDog2ID_FK').value = document.getElementById('cbParamVirtual1').value;
      document.getElementById('TrackerAdopterInterestedDog3ID_FK').value = document.getElementById('cbParamVirtual1').value;
      }
    console.log("Test");
    }
    </script>

     

  2. @AtayBalunbalunan thanks for the reply.

    I hadn't thought of the Triggered Action as an option but I do like it.  I was so focused on just leveraging the datapage to help manage the flow and information that I overlooked it but you are right, I would have to add a new value to pass the option to the triggered action.  Thanks.

    I did look up the tech tip which led me to a part of the flow that I didn't show where it does navigate to a specific page based on the option.

     

    Thing is, I still want to understand the right syntax to set Yes/No Boolean values in Javascript.  I keep feeling it shouldn't be as hard as it is, but for me, it is.

     

  3. I am trying to dynamically set a Yes/No field in addition to redirecting a user after completion of a submission page.

    This is the code that I have in the Destination Page.  Virtual1 captures the type and YesNoVariable is the flag that I want set.

    What I've done below does provide the right redirection based on the Virtual1 value but the value to set the YesNoVariable to true (or checked) does not.

    <script type="text/javascript">
    
    if("[@cbParamVirtual1]" == "Adoption")
    {
     document.getElementById("InsertRecordYesNoVariable").checked=true;
     window.location = "http://page1?ProfileID=[@field:ProfileID]&ProfileFullName=[@field:ProfileFullName]";
    } 
     else if("[@cbParamVirtual1]" == "Foster")
    {
     window.location = "http://page2";
    } else
    {
     window.location = "http://otherpage";
    }
    </script>

    Appreciate fixing my code and any help in understanding how to properly set this value.  Thanks in advance.

     

×
×
  • Create New...