Forum Discussion

Jonathan_Gibson's avatar
Jonathan_Gibson
Qrew Cadet
4 months ago

ifv and OpenAsPopup conflict

I have a rich text button for the user to click to make a quick edit, which opens a popup window that leverages a code page to close automatically when saved (following the "CloseWindow.html" pattern illustrated here).

I am attempting to also hide the normal qb UI in the popup window utilizing an ifv parameter, but when I do this the window no longer closes automatically. 

My base url is in a field [Edit User Alert]:

URLRoot() & "db/" & Dbid() & "?a=er&rid=" & URLEncode([Record ID#]) & "&dfid=11" & "&z=" & Rurl()

My rich text button adds the ifv (currently commented out) and NextURL parameters to the url and sets the class:

var text url = "'" & [Edit User Alert] &
//"&ifv=10" &
"&NextURL=" & URLEncode(URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=5") & "'"
;
...
var text class = "'OpenAsPopup' data-height=600 data-width=850 data-refresh=true ";
...

The window closes correctly without the ifv parameter but when it's added the window no longer closes. Where am I going wrong?

4 Replies

  • Thanks for the input! It's been a bit since I worked on this but I did just do a quick test to confirm that yes, including both parameters `&ifv=1&hs=1` successfully hides both the UI elements and the save button. However, I can't tell if the code page redirect to close the window is working or not since without the button I no longer have a way to save the record. When I have some time I'll see about adding a custom save button so I can test it fully and report back.

    I haven't created a custom save button before; do you have a go-to pattern that you use?

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      A low Tech solution is to create a button that will navigate away from the record. The record will auto save. If you need the button to re-display an unsaved record, which is still in Add mode then that is a little more complicated, but there is code for that.

  • Holy cannoli, 2 seconds after I responded I ran into this post from someone else on here - you add an additional parameter to your URL: "&hs=1" to hide the save button. Then you can create a custom save button and you should be able to make it work from there. I haven't tested this but definitely let me know if you try it out and it works. 

     

    domain.quickbase.com/db/dbid?a=er&rid=rid&ifv=1&hs=1

  • I ran into this recently as well, doing almost the exact same thing as you. From what I was able to find out, it has to do with the native "save" button that appears when you use "&ifv=1" to remove the normal QB UI.

     

    I was unfortunately not able to resolve it so I ended up scrapping that idea, which is unfortunate because I run into plenty of situations where people don't actually want to leave a page in order to make a change and return to where they started, so a popup is ideal. 

     

    Wondering if anyone else here has been able to work around this situation?