Skip to main content
Question

Formula button on a form that opens an add record screen as a popup

  • Dec 13, 2024 6:15 PM UTC
  • 0 replies
  • 141 views

Forum|alt.badge.img+1

In the new forms, if you have an embedded child table and click the add record button. It will "popup" the add record form without redirecting to a new page, or opening a new tab. Is there a way to make a formula url or formula rich text button do that?

Forum|alt.badge.img+20
  • Qrew Champion
  • Dec 16, 2024 6:11 PM UTC

A formula URL button has a selection in the field settings to Open in a Popup window. That is the easiest solution, but you also cannot control the popup size. To control the size, you can use a rich text formula. 

In general, you use class OpenAsPopup
class='OpenAsPopup' data-height=800 data-width=900 data-refresh=true

(data-refresh=true will refresh your page when you close the popup, simply delete that if you do not want auto refresh)

Incorporate in a button as you need, sample below (but there are lots of ways to construct the button in a rich text field)

var text URL = URL Here;

"<a class='OpenAsPopup' data-height=800 data-width=900 data-refresh=true style=\"text-decoration:none; background: #688EB3; border-radius: 5px; color: #ffffff; display: inline-block; padding: 4px 0px 0px 0px; width:145px; height:22px; text-align: center; text-shadow: none; border: 0px solid #030404; font-size: 12px \"href='"
  & $URL
  & "'>Button Words Here</a>"