how do I add a save button to a form?

  • 1
  • 2
  • Question
  • Updated 3 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

  • 50 Points

Posted 6 years ago

  • 1
  • 2
Photo of Mike

Mike

  • 50 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!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,760 Points 50k badge 2x thumb
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?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,760 Points 50k badge 2x thumb
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
If anything, I would like the record to be added and the form to refresh for another record addition
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,760 Points 50k badge 2x thumb
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

  • 996 Points 500 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

  • 996 Points 500 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>";