Home › Forums › Classic DFFS › Content Types and DFFS – newform.aspx opening different starting tabs/rules
- This topic has 7 replies, 2 voices, and was last updated 4 years, 6 months ago by Alexander Bautz.
-
AuthorPosts
-
-
April 22, 2020 at 19:15 #29569
Hi Alex,
I understand you do not recommend using content types with DFFS, and the functionality can be mimicked/copied using the tabs/rules etc.
QUESTION
Out the box list content types, lets you create a links from a page that opens that particular out the box SP form showing different field, based which link went to which content type.
How do we mimic this using DFFS?
I think you can open a specific tab adding some text to end of the URL (at least for edit form). But is there any way we could let users, using different links to see different fields on their newform.aspx via purely DFFS?
Kind Regards,
Paul -
April 22, 2020 at 22:51 #29576
Create your link something like this:
.../Lists/YourList/NewForm.aspx?ShowForm=FirstType
Then create a rule in your DFFS NewForm triggering on “URL Query string key equals” and insert this in the This value field:
ShowForm=FirstType
Now you have a rule triggering on this URL key and can show fields or tabs etc. based on this key. Add multiple different links – for example ShowForm=SecondType and pick up the URL key with different rules and you should be good to go.
Let me know how this works out.
Alexander
-
April 23, 2020 at 16:35 #29594
Thanks Alex,
This seemed to work brilliantly at first.
But when I tried to add two URL Query Strings via two rules, one rule appears to stop being applied. (the first rule)
I debugged both rules, and it seems to successfully apply the Query String logic and turn green (depending on the URL) and the other a red false as expected. But for first rule, it does not do anything, as if there is no query string at all in the URL.
What is really strange is that if I change the order of the rules around (the second one is then applied not the first one). These are the only two rules on the form.
I thought something had gone corrupt, so I created a new list and installed DFFS again, and had same outcome.
Configuration
TAB 0 (Index 0) and TAB 1 (Index 1)RULE 1
TAB 0 – ShowForm=FirstType (this is in the rules for Query String)
Set to hide tab 0 (hides a Unique ID, and shows a Unique ID in TAB 1)
RULE 2
Set to hide tab 0 (hides a Unique ID, and shows a Unique ID in TAB 1)
TAB 1 – ShowForm=SecondType (this is in the rules for Query StringThe result of the above configuration:
URL – …/Lists/YourList/NewForm.aspx?ShowForm=FirstType
just shows up the form as if no rules were applied.
URL – …/Lists/YourList/NewForm.aspx?ShowForm=SecondType
Follows the rule.Both debugs show they action rules correctly.
Switching RULE 1 and RULE 2 around, causes one to work the other to not work.
- This reply was modified 4 years, 8 months ago by Paul Lynch.
- This reply was modified 4 years, 8 months ago by Paul Lynch.
- This reply was modified 4 years, 8 months ago by Paul Lynch.
-
April 23, 2020 at 20:03 #29601
I guess this is caused by the built in automatic reversing of rules evaluating to false – try clicking the “No reversing of this rule” checkbox for each of the configured ruels.
You find more info about reversing of rules in the top of the Rules tab.
Alexander
-
April 28, 2020 at 09:42 #29663
Thanks Alex this fixed it.
Not sure why I did not even try this.
-
April 28, 2020 at 13:59 #29666
Thanks for the feedback – I’m glad it fixed the problem.
Alexander
-
May 29, 2020 at 12:20 #30346
Hi Alex,
I am trying to get the above Query string Link to work for editform.aspx but having an issue because I am not sure how to write the parameter.
Newform is straight forward..
../Lists/YourList/NewForm.aspx?ShowForm=FirstType
But Editform has things like
?ID=
&Source= (handy redirect)Looking to create a link in the send email function in a newform.aspx. The link in the email will take the user to the editform.aspx with a specific URL that will show them a specific form (based on a Query string rule)
e.g. I know I am writing this wrong..
../Lists/YourList/Editform.aspx?ID={ID}&ShowForm=ThirdType&Source=etc...
Also in newform, the form has not populated the ID, so not sure I can even do this, unless there is a way to use the _DFFSID?
- This reply was modified 4 years, 6 months ago by Paul Lynch.
- This reply was modified 4 years, 6 months ago by Paul Lynch.
-
May 29, 2020 at 13:28 #30350
When creating a link from NewForm you don’t have the ID, but I have functionality in DFFS that lets you specify it like this:
.../Lists/YourList/Editform.aspx?DFFSID={_DFFSID}&ShowForm=ThirdType&Source=etc...
When you now follow the link and enter EditForm, DFFS picks up the DFFSID key from the URL and finds the correct ID from a query and redirects you to the correct item.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.