how do I add a save button to a form?

  • 1
  • 3
  • Question
  • Updated 6 months ago
  • Answered
Looking to add a save button to a form, I am sending the user to a Survey and want to embed a Save button at the bottom of the form in case the existing save button in the top right is not obvious enough.

I am using this
<button id="btnFormSaveDone" class="Vibrant Success" onclick="OnClickSave(kFormAndDone)">Save</button>

And the result is
"The text to be displayed here contains an event handler. Event handers are not allowed."
Photo of Mike

Mike

  • 60 Points

Posted 6 years ago

  • 1
  • 3
Photo of Mike

Mike

  • 60 Points
Figured it out final solution

var text URL = "javascript:void(DoSaveAdd())";var Text Image = "<a id='saveButton' class='Vibrant Success' onclick='DoSaveAdd()' href='#'>Submit</a>";"<b href =" & $URL &">" & $Image & "</b>"
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
I keep getting the error "The text to be displayed here contains an event handler. Event handers are not allowed." Do you know how I could deal with that? Thanks for the help!
This is what I used

WhatEverYouWantYourButtonToSay"
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
My form text field has "HTML (Limited)" checked and it only allows specific html tags. And I believe that is what is not letting me use variables and formulas. Anyway I can change that?
You need to make a Rich Text formula field, and not just a form element.  here is the code.  My previous post did did not show the code due to how this formum  operates. 

"<a id='saveButton' class='Vibrant Success' onclick='DoSave()' href='#'>WhatEverYouWantYourButtonToSay</a>"
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
My apologies but could you tell me how to create a RTF field?
np, just go to Settings for the table
Fields
Create new field
Type will be Formula Rich text. 
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
That is awesome! I was able to create that and I was testing it out but rather than saving the form it keeps saying the "Data for the field 'SaveButton' is too long". Do you know what I might be messing up?
Most unusual.  Can you tell me what the field type is?  Is it a formula Rich Text field type?
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
It says: "Field type: Rich Text (formula)"
Please post the code for your formula
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
It worked! Except the record saves and it switches to the dashboard rather than staying on that form. Sorry for the bother but any help on that front would be appreciated.
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
If anything, I would like the record to be added and the form to refresh for another record addition
I don't know how to refresh to add another record.  But if you make a button on the dashboard then it allows you to set the button to return to the Dashboard. 
Photo of Khizar Hussain

Khizar Hussain

  • 122 Points 100 badge 2x thumb
No worries! Thank you so much for all the other help :)
Photo of Everett Patterson

Everett Patterson

  • 1,058 Points 1k badge 2x thumb
Add the href link, which will act like a save and new

"<a id='saveButton' class='Vibrant Success' onclick='DoSave()' href='https://mydomain.quickbase.com/db/myappDBID?a=nwr'>WhatEverYouWantYourButtonToSay</a>";
Photo of Everett Patterson

Everett Patterson

  • 1,058 Points 1k badge 2x thumb
Add the href link, which will act like a save and new

"<a id='saveButton' class='Vibrant Success' onclick='DoSave()' href='https://mydomain.quickbase.com/db/myappDBID?a=nwr'>WhatEverYouWantYourButtonToSay</a>";