Skip to main content
Question

Submit Button w/o JavaScript

  • February 28, 2020
  • 0 replies
  • 71 views

Forum|alt.badge.img+6
Hi,

I have a bit of a dilemma.
From my understanding, JS will not be supported within buttons in the near future.
How can I create a submit button for a form without using JS?

The issue I run into using the following line of code:

URLRoot() & "db/" & [_DBID_ELS_OPS_SUPPORT] & "?a=API_EditRecord&AppToken=" & $Token & "&rid=" & URLEncode ([Record ID#])& "&z=" & Rurl()
& "&_fid_113=true"
& "&_fid_114=" & Now()
;

Is that it needs a record ID# to reference. If the record has yet to be saved, then it won't have one to edit and check a box. So it tells me the record does not exist.
I have tried to redirect it to creating a fake child then redirecting back since that triggers a save, but it happens too fast and I end up with the same result.

I am hoping someone knows of another solution.

Thank you.

------------------------------
Curtis Middleton
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+6
  • Author
  • Registered
  • February 28, 2020
I am close to a solution:

I was going to create a 2nd Submit button paired with an automation.
There is an ability to add attachments (child) which triggers the record to be saved.

Some requests do not require an attachment but it is an option.
I will have a summary field for how many attachments there are.
If = 0, then I will have the 2nd submit button show, this will pretend to create a child record which will cause the parent to save, and then it will redirect them to where I want, making them feel like they directly submitted it.

On the back-end, I will have an automation that says when a record is saved, attachments summary = 0, and the request type = x or y or z, check 'Submit Checkbox'. This will trigger my other functions to operate as should.

The issue I discovered with this is that if they do want to add an attachment, it will trigger the 'Submit' function early since the attachments will be at 0 until they save the attachment.

------------------------------
Curtis Middleton
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
It s unlikely that javascript will stop being supported.  It is more likely that the Realm Admin will be able to block the use of javascript in order to have a fully secured environment.

But can you explain what you are trying to do.  Are you trying to replace the native save button?  Have to tried enabling he checkbox called "Save Parent Record Automatically when child record is added, checkbox in The Advanced Properties for the Table and then having a button to navigate away from the record?


EDIT: Sorry, I missed the tread above.  I see that you are trying to set a checkbox.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------

AdamKeever1
Forum|alt.badge.img+2
  • Registered
  • May 1, 2020
@Curtis Middleton, here is a post that shows how to use API AddRecord to create a new record with an existing Record ID#:

New Record with Record ID# ​

------------------------------
Adam Keever
------------------------------