Issue trying to action URL query string

Forums Classic DFFS Issue trying to action URL query string

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #9741
      Julian Knight
      Participant

      Hi, I’m new to DFFS. Many thanks for an excellent tool that I’m finding a lot better than trying to wrangle InfoPath!

      I am trying to create a form that that changes fields depending on the “form type” required. This is for an approvals/rfi form.

      The manual states that if I have a URL of the form:

      https://myorg.sharepoint.com/my/path/list/newform.aspx?frmtype=rfi

      I should be able to use

      {url:frmtype}

      to get the form type specified in the URL.

      So in the visible fields and headings section I created a “heading” containing the following:

      <p>Form Type: {url:frmtype}</p>

      But the form type is never shown.

      I assume I’m doing something wrong but I’m not sure what?

      I’m using v4.360 with SharePoint Online.

      Thanks, Julian.

    • #9743
      Alexander Bautz
      Keymaster

      Hi,
      I’m glad you like DFFS!

      You have misunderstood this functionality a bit as the built in functionality is used if you want to use the URL parameter as a trigger for a DFFS rule.

      What you try to do can easily be done with a line of code in the Custom JS textarea.

      First change your “heading” like this:

      <p>Form Type: <span id='formTypePlaceholder'></span></p>

      Then add this to the Custom JS textarea:

      $("#formTypePlaceholder").html(GetUrlKeyValue("frmtype"));

      Alexander

    • #9761
      Julian Knight
      Participant

      Ah! OK, I get it now. Actually I was trying to work out how to create a rule – the display part was just me taking small steps. However, the code you’ve given is very useful as it points me in the right direction to be able to do some other automation on the form now I can make the connection between the utility functions and the display via JQuery.

      I’ve now also managed to get the form to switch automatically by creating a rule that runs on form ready and sets the field that controls the display from {url:frmtype}.

      So great stuff. Thanks. I’ll be putting in a request to our programme team to get a license key shortly.

      Regards, Julian.

    • #9794
      Alexander Bautz
      Keymaster

      I’m glad it worked out.

      Alexander

Viewing 3 reply threads
  • You must be logged in to reply to this topic.