Skip to main content
Question

URL button code

  • December 12, 2019
  • 0 replies
  • 53 views

Forum|alt.badge.img+14
I used something I found in magic buttons to create a button that allows an EOTI user to submit a form and then direct to a 'Request Received" html page. This button automatically saves and redirects because my form automatically saves child records.

I before it saves and redirects, I would like a display box to come up that says something like "Have you added photos?"  (or other possible messages) and the user can say cancel or confirm submission. 

Cancel would of course put them back on edit mode, and confirm would direct them to the received.html page.

How can I do this?

Thanks.

------------------------------
Mike Tamoush
------------------------------

AdamKeever1
Forum|alt.badge.img+2
  • Registered
  • December 12, 2019
Check this video from Kirk Trachy out:

Pop up messages

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

AdamKeever1
Forum|alt.badge.img+2
  • Registered
  • December 12, 2019
I'm glad you asked this question. After having seen Kirk's video and pondered your use case, I found that you can add an HTML button with an href to the URL of an HTML button to edit fields in a form and redirect back to the same form in edit mode.

First I made a formula rich text button to fill in the status as "Approved" and log the approval date:
"<a style=\" text-decoration: none; background: #00ff00; border: 10px solid #00ff00; border-radius: 3px; color: #000000; display: inline-block; font: normal 700 20px/1 \"Calibri\", sans-serif; text-align: center; text-shadow: none; href='"&
URLRoot() & "db/" & Dbid() & "?\n\na=API_EditRecord&apptoken=YOUR_TOKEN_HERE &rid=" & URLEncode ([Record ID#])

& "&_fid_20=Approved"
& "&_fid_19="& "Today"

&"&rdr=" & URLEncode(

URLRoot() & "db/" & Dbid() & "?a=er&rid=" & [Record ID#]) & "''>Approve</a>"

Next I added a dynamic form rule to display a message when the date field is not equal to blank and used this in the message body:
<a style= "text-decoration: none; background: #00ff00; border: 10px solid #00ff00; border-radius: 3px; color: #000000; display: inline-block; font: normal 700 20px/1 "Calibri", sans-serif; text-align: center; text-shadow: none; href="https://YOUR_REALM.quickbase.com/db/YOUR_DBID?a=API_EditRecord&apptoken=YOUR_APP_TOKEN%20&rid=3&_fid_20=Approved&_fid_19=Today&rdr=https%3A%2F%2FYOUR_REALM.quickbase.com%2Fdb%2FYOUR_DBID%3Fa%3Der%26rid%3D3">Approve</a>

When date is blank:

When date is not blank:

After clicking the Approve button:

So the button is working, but I need to figure out how to save&keep working before the other actions...

Maybe tomorrow.



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