Forum Discussion
"<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Update & Keep Working</a>
- RyanBlackwood8 years agoQrew TraineeI think this is what I was looking for, however, div doesn't work (it doesn't create a button, just displays static text "Save and Keep Working").
I changed it to:
"<a class='Vibrant Success' onclick=$('#footerSaveAndKeepWorkingMenuOption').click();>Save and Keep Working</a>"
This now gives me a button that works. Thanks so much!- DavidRascon3 years agoQrew Trainee
Hi everyone!!
I know this is a very old post but I have the same situation but now A rich Text formula field doesn't accept javascript.
How can I do it now?
Thank you!
------------------------------
David Rascon
------------------------------- MarkShnier__You3 years ago
Qrew Legend
Try this:
var text RID = If([Record ID#] > 0, ToText([Record ID#]), "%%rid%%");
var text URL = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $RID;
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #1ba802; border-radius: 5px; color: #ffffff; display: inline-block; padding: 5px 5px 5px 5px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 14px \"href='"
& $URL
& "'>Save and Display in Edit Mode</a>"Note that for this to work, the Advanced setting for the Table needs to be set to "Auto save before navigating away" and also the Parent record must have been "dirtied" with some data entry. If the only data entry is on a Grid Edit child table, then this will not work.
If you need it to work in that grid edit situation, then you need to use a form rule to be sure that the record gets dirtied. Such as set a dummy numeric field equal to the value in that field plus 1.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- RyanBlackwood8 years agoQrew TraineeThis only seems to work on records that have already been saved. Is there a code that will work on new records? Save the record, then dump you back into edit mode on the same record? Right now if I use this formula on a new record, it will save that record and dump you into edit mode in a new record (which then becomes an endless loop).
Thanks - QuickBaseCoachD8 years agoQrew CaptainCourtesy of Dan Diebolt
Dan the ultimate (Champion) replied to this question:
Is it possible to create a "Save and Keep Working" button from a formula URL field?
Put a Rich Text Formula field in the middle of your form with this definition:
"<div style='Vibrant Success' onclick=$('#footerSaveAndKeepWorkingMenuOption').click();>Save and Keep Working</div>"
When it is clicked it will trigger the clicking of the native Save and Keep Working button (even though it is not visible at the moment). FWIW, this type of strategy of embedding JavaScript into a form which emulates a user clicking on a native features is safer than other methods of more directly invading the native markup and code.