Discussions

 View Only
  • 1.  Save Button that keeps me on the same form.

    Posted 04-19-2017 03:56
    I'm having an issue trying to create a Save Button that returns to the form the Button is on. The Form ID I've placed the Button on is 17. When I click the Save Button it goes to the Main Form. I'm using this:

    "Save"

    Is there a place in the code where I can put the Form ID#? I've looked at several articles and it doesn't answer this exact question. Although I may be missing something as I'm new to code.


  • 2.  RE: Save Button that keeps me on the same form.

    Posted 04-19-2017 06:12
    Hi,

    Create a formula URL button and insert this code:

    URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm" & URLEncode ([Record ID#])& "&z=" & Rurl() & "&dfid=17"

    Replace [_DBID_DOCUMENTS] with your table DBID which you can find from the table properties.

    Do not forget to check the option "Save parent record automatically when a child record is created." under the advanced settings from your table properties.

    Please let me know if you need any further help.

    Thanks,

    Gaurav Sharma


  • 3.  RE: Save Button that keeps me on the same form.

    Posted 04-19-2017 11:37
    Dear bgstatdex

    Can you post your current code? It did not come though in your post. I think the pre button at the bottom of the box helps retain the original code.


  • 4.  RE: Save Button that keeps me on the same form.

    Posted 04-22-2017 16:12
    Please help me, I'm stuck and there have no more responses in the community.  I would appreciate it as I'm trying to go live with the project on Monday.

    "<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Update</a>


  • 5.  RE: Save Button that keeps me on the same form.

    Posted 04-19-2017 14:38


  • 6.  RE: Save Button that keeps me on the same form.

    Posted 04-19-2017 14:39
    This is the code I'm using. "Update


  • 7.  RE: Save Button that keeps me on the same form.



  • 8.  RE: Save Button that keeps me on the same form.

    Posted 04-20-2017 16:23
    I was using my iPad to post and it obviously didn't paste.  Try again:

    "<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Update</a>


  • 9.  RE: Save Button that keeps me on the same form.

    Posted 04-20-2017 17:36
    I was using my iPad to post and it obviously didn't paste.  Try again:

    "<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Update</a>