Forum Discussion
- QuickBaseCoachDQrew CaptainSee if this idea works
var text Edit = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10";
var text ViewOnFormTen = URLRoot() & "db/" & Dbid() & "?a=dr&dfid=10&rid=" & [Record ID#];
var text URL =
$Edit
& "&NextURL=" & URLEncode($ViewOnFormTen);
var text Words = "click here";
"<a href=" & $URL & ">" & $Words & "</a> - KellyBianchiQrew Assistant CaptainThat opened a fresh form. I don't need it to edit. The 'Update' button puts the form in edit mode. I just need it to save and display the correct form. Isn't there a way to amend the onclick='DoSaveAdd() so that it displays the current form upon save?
- QuickBaseCoachDQrew CaptainSorry the first line was supposed to read
var text Edit = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" & [Record ID#]; - KellyBianchiQrew Assistant CaptainBut that's still an 'edit record' command. I'm not looking for the button to edit the record. I just want it to save it. The form is already in edit mode and has been edited. I just want to click a button that saves like 'onclick='DoSaveAdd() ', but I need it to stay on the same form.
- KellyBianchiQrew Assistant CaptainOr are you thinking I should edit the 'update' button?
- QuickBaseCoachDQrew CaptainI'm suggesting that they use the edit button and then the regular save button will stay on the proper form. I don't know how to change the DoSaveAdd button to force a particular form, so I'm offering up an alternative solution.
- QuickBaseCoachDQrew Captainyes, this would replace your update button.
- KellyBianchiQrew Assistant CaptainGood call as usual, Mark... that worked!
- QuickBaseCoachDQrew CaptainThx for letting me know it worked. I guess that you are still "stuck" with the native edit button at the top right, but that native Edit is pretty subtle compared to your row of matching buttons which look more inviting to click.
- KellyBianchiQrew Assistant CaptainNot entirely... I have reinstated the DoSaveAdd and retained my save button, and it works just as the native button does :) Win, win!
- JanaBakerQrew CadetKelly...what was the final code that you implemented to make it work properly? I'm trying to accomplish the same thing. :)
- KellyBianchiQrew Assistant CaptainRemember, this is a row of navigation, so the one you want is 'Update Info' (bolded).
// Begin button style
var text ViewOnFormThirtyOne = URLRoot() & "db/" & Dbid() & "?a=dr&dfid=31&rid=" & ;
var text bgcolor = "#4b72b0";
var text txtcolor = "white";
var text URLONE = URLRoot() & "db/" & Dbid() & "?a=er&dfid=31&rid=" & ;
var text URLTWO = URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=" & URLEncode("Service Request Form.html") & "&clist=a&rid=" & ;
var text URLTHREE = "https://vcommerce.quickbase.com/db/bnhjmd73w?";
var text URLFOUR = $URLONE & "&NextURL=" & URLEncode($ViewOnFormThirtyOne);
var text style = "style=\"text-decoration: none; background:" & $bgcolor & "; border-radius: 5px; padding: 10px 24px; margin-bottom:5px; width: auto; font-weight: normal; font-size: 12px; text-align: center; display: inline-block; color: " & $txtcolor & "; font: normal 700 24px/1 \"Calibri\", sans-serif;";
// End button style
"<div>" &
"<a " & $style & " href='" & $URLFOUR &"'>Update Info</a>" & " " &
"<a " & $style & " href='" & $URLTWO &"' target=\"new\">Print Record</a>" & " " &
"<a " & $style & " onclick='DoSaveAdd()'href='#'>Save Changes</a>" & " - JanaBakerQrew CadetKelly this is amazing! I wont lie, some/most is over my head but i can piece it together. I'd love to mimic this if possible, but think i need a little hand holding if you dont mind?
To make sure i get it it, all of this code makes all four buttons your reference at the beginning of the post! My needs fairly close.
Upon saving, i want the user to return to Report 27 when sitting for Form 16. Currently they are being forced back to the original form, and i dont want that. How can i that into your code? I have little bits working but not all. This redirects the user to report 27:
URLRoot() & "db/" & [_DBID_LEADERS2] & "?a=q&qid=27&nv=1&v0=" & [Record ID#];
Your URLTWO goes to Service Request, mine would go to the "A-Team Dashboard"...what would i put in place of what you have here: URLEncode("Service Request Form.html"?
Then URLTHREE would just be my QB App i would assume? And for other changes i would need to make...where you have Form 31, i put what form # the buttons are sitting on? So Form 16 in this example and use [Record ID#] vs. ?
Thank you in advance!!