Forum Discussion
AlexWilkinson
Qrew Assistant Captain
Here's a cleaner way to do this, replicating the color and style of the standard 'Save & keep working button' while allowing it to be placed anywhere on the form:
1) In the form properties, check the box to "Show save & keep working choice." (It's not necessary to also check the box to show the save and cancel buttons at the bottom of the form. That's optional.)
2) Create a global variable for your app at Setting >> Variables ... Let's say you call it "mySaveKeepWorking" or something similar ... and give it exactly the following value (the quotes are critical!)
<a class='Vibrant' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;' onclick='$("#saveAndKeepWorkingMenuOption").click();'>Save & keep working</a>
3) In your table, create a rich text variable ... say it's called "mySKW" and give it exactly and only the following value:
[mySaveKeepWorking]
4) In your form, place the mySKW field wherever you want, as often as you like. Each time, be sure to check the box for "Use Alternate Label Text" while leaving the value blank, and to set the form-row for "edit and add" modes.
When you save the form, Quick Base will ask you to confirm that you really do want the mySKW field to appear multiple times, which you do!
That's it. One wrinkle: it might be nice to have mySKW return to the same spot on the form where it was clicked. That's doable but a bit fancier. Post back here if interested.
1) In the form properties, check the box to "Show save & keep working choice." (It's not necessary to also check the box to show the save and cancel buttons at the bottom of the form. That's optional.)
2) Create a global variable for your app at Setting >> Variables ... Let's say you call it "mySaveKeepWorking" or something similar ... and give it exactly the following value (the quotes are critical!)
<a class='Vibrant' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;' onclick='$("#saveAndKeepWorkingMenuOption").click();'>Save & keep working</a>
3) In your table, create a rich text variable ... say it's called "mySKW" and give it exactly and only the following value:
[mySaveKeepWorking]
4) In your form, place the mySKW field wherever you want, as often as you like. Each time, be sure to check the box for "Use Alternate Label Text" while leaving the value blank, and to set the form-row for "edit and add" modes.
When you save the form, Quick Base will ask you to confirm that you really do want the mySKW field to appear multiple times, which you do!
That's it. One wrinkle: it might be nice to have mySKW return to the same spot on the form where it was clicked. That's doable but a bit fancier. Post back here if interested.
_anomDiebolt_
7 years agoQrew Elite
Alex's formula:
This can be applied to Mark's inquiry as well. These two fragments are essentially equivalent:
<a class='Vibrant' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;' onclick='$("#saveAndKeepWorkingMenuOption").click();'>Save & keep working</a>can be shortened to this (not tested):
<a class='Vibrant' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;' onclick='saveAndKeepWorkingMenuOption.click();'>Save & keep working</a>It is a little know fact (to even seasoned developers) that modern browsers automatically create a global variable named after every attribute id in the page. So in the above formula instead of using a jQuery selector and jQuery's click() method, you can use native JavaScript and a raw reference to the global variable saveAndKeepWorkingMenuOption.
This can be applied to Mark's inquiry as well. These two fragments are essentially equivalent:
<a class='Vibrant' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;' onclick='$("#saveButton").click();'>Save & Nothing More</a>
<a class='Vibrant' style='font-size:14px; color:white; background:#6BBD57; white-space:nowrap;' onclick='saveButton.click();'>Save & Nothing More</a>
- RichieEyles15 years agoQrew MemberCan we check a box first and then save and carry on, when it is a new record?
------------------------------
Richie Eyles
------------------------------