Internal "Save" function?

Forums Classic DFFS Internal "Save" function?

Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #20871
      Keith Hudson
      Participant

      I need to hide the Save button and give my users multiple action options (Save without changing the status, Save and increment the status, Approve and save, Reject and save, etc.). Is there a built in function in DFFS I can use to save the current form to SharePoint using javascript? Something like, spjs.dffs.ctrl_s?

      Just to be clear, I’m looking for a line of javascript code that will bring about the same results as clicking the Save button on an ordinary form — run any automatic validations and PreSave actions, save all field values on the form to the SharePoint list, and close the current form, returning to the url contained in the Source querystring variable.

      Said another way, I want to be able to hide the Save button, then mimick clicking it via code.

    • #20873
      Keith Hudson
      Participant

      OK, I figured it out. No need for an internal save function. This does the trick:
      jQuery(‘input[value=”Save”]’).trigger(“click”);

    • #20887
      Alexander Bautz
      Keymaster

      Yes, this does the trick. I have wrapped this exact same method in a function in DFFS like this:

      spjs.dffs.triggerSave();

      I cannot recall when I added it so it might not be available in older versions.

      Alexander

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