Home › Forums › Classic DFFS › Set cursor position after Rules
- This topic has 6 replies, 3 voices, and was last updated 6 years, 3 months ago by Alexander Bautz.
-
AuthorPosts
-
-
February 12, 2018 at 01:44 #19757
Hi Alexander,
Is there a way to position the cursor to a specific field after Rules have been fired?
I’ve got a bunch of Content Types and a Managed Metadata field which uses the set field value in a rule.Once rule is triggered, if I click in an empty text field and click Save all works fine, but if I just click Save I get error:
“Value cannot be null. Parameter name: Term Id”. (attached)If you can please provide a script that can click in a text field after rules are fired, this would help me seal the deal for DFFs SCA license purchase.
Ask if you need more details?
Thanks.Attachments:
-
February 13, 2018 at 05:05 #19787
Hi Alexander,
From further testing, are you able to provide a script to click out of the Managed Metadata box from a function in a Rule?
The last field on the form is this “Doc” Managed Metadata field and it seems to work when I click on anywhere else on the form, then I click Save button.
I’ve been Googling this and I was leaning towards a jQuery .focusout method, is that right?
Your help is much appreciated.
Regards. -
February 13, 2018 at 21:45 #19813
Hi,
You can try adding this to your Custom JS and call the function from the “Run these functions / trigger these rules” in the rule:function focusOnTitle(){ jQuery("#dffs_Title input:text").focus(); }
-
February 14, 2018 at 01:49 #19823
Thank you Alexander that worked perfectly.
I also changed it to use the filename column:jQuery("#dffs_FileLeafRef input:text").focus();
SCA license purchase will follow shortly now that my Manager is impressed DFFS could do what Nintex Forms couldn’t.
Cheers.- This reply was modified 6 years, 10 months ago by Brett.
-
February 14, 2018 at 21:26 #19838
I’m glad we got it sorted 🙂
Alexander
-
September 18, 2018 at 17:02 #22121
I’m having trouble setting the focus on form load to a people picker field. I tried the function above (as jQuery(“#dffs_Recipient input:text”).focus();) without success. Any thoughts as to why it is not working?
Thanks in advance.
-
September 23, 2018 at 11:23 #22177
Hi,
I think the people picker input in earlier SP versions might actually be a div (with contenteditable property) – use the developer tools to inspect the field and change the selector to target the correct element.Alexander
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.