Home › Forums › Classic DFFS › Issue trying to action URL query string
Tagged: url query
- This topic has 3 replies, 2 voices, and was last updated 8 years, 10 months ago by Alexander Bautz.
-
AuthorPosts
-
-
January 4, 2016 at 16:15 #9741
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.
-
January 4, 2016 at 21:03 #9743
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
-
January 5, 2016 at 15:43 #9761
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.
-
January 5, 2016 at 21:35 #9794
I’m glad it worked out.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.