Help! Choose file button for a text field (Triggering a file upload from an shape widget rather than a text box)

Hi,
May I please ask if anybody could advise how to change the format of the button that shows up when you assign “File” to a text field? I would like it to match the buttons in the rest of my theme.
image
Triggering a file upload from an shape widget.rp (54.8 KB)

Thanks,
Natalie

Hi Natalie!

You are very close. The javascript applied OnLoad to the Add File button makes the button invisible to clicks, so you can click through it and hit the button behind it.

javascript:void($('[data-label=g]').css('pointer-events','none'))

However, it expects the button to be named “g”. You can change the javascript to what your button is actually called. (If it has any spaces in , you’ll need to surround it by double quotes.) Or just change the name of your button to “g”.

1 Like

2 Likes

Hi Joseph,
Wow, this works like a charm! Truly appreciate it! :slight_smile:
Natalie

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.