Forum Discussion
_anomDiebolt_
10 years agoQrew Elite
The Easy Button is a variant on the standard Image Onload Technique that simply places a button in the very same field where the image onload field is located. Clicking on the button will cause an event handler defined within the module.js page to trigger. Normally the image onload field is is configured to not be visible because its only purpose is to inject script saved in a user defined field into the QuickBase authored page. With the Easy Button Technique we add a <a> after the image onload formula which is visually rendered as a button and clicks are the <span> are detected within the module.js script. To the extent field values are passed between the record and the script they are passed as data attributes and read in the script using the dataset method. Some of these conventions may seem new or even odd but the purpose is to streamline the formula so it is simple to use from one application to another.
Easy Button ~ Table Dashboard
https://haversineconsulting.quickbase.com/db/bkkq35bum?a=td
Here is the formula for the image onload field [Button] (in this case we want to field to display and not be "hidden" so we name it [Button] instead of [-]):
[iol] & "moduleTable1.js" & [/iol]
&
"<a class='QBU_Button Vibrant Success' " &
" data-rid='" & [Record ID#] & "'" &
" data-name='" & [Name] & "'" &
">Button</a>"
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=482
Easy Button ~ Table Dashboard
https://haversineconsulting.quickbase.com/db/bkkq35bum?a=td
Here is the formula for the image onload field [Button] (in this case we want to field to display and not be "hidden" so we name it [Button] instead of [-]):
[iol] & "moduleTable1.js" & [/iol]
&
"<a class='QBU_Button Vibrant Success' " &
" data-rid='" & [Record ID#] & "'" &
" data-name='" & [Name] & "'" &
">Button</a>"
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=482