You are viewing limited content. For full access, please sign in.

Question

Question

Can I have a field unhidden after user clicks on link?

asked on February 24, 2020

Can Forms be set up so that a hidden field shows up only after a user clicks on a link in an HTML field? 

EXAMPLE:  This would be just like the Terms & Conditions documents that many websites insist you read before continuing.  

The idea is there are document(s) that need to be reviewed and then a declaration to be made that "Yes, I did review the document." But can we make it so that the declaration (maybe a radio button field?) won't show up until after they at least open the link?

 

0 0

Replies

replied on February 24, 2020

You couldn't do it with only "out-of-the-box" functionality, however, you could use a little bit of javascript to supplement the built-in functionality provided by field rules.

For example, you could add a hidden field with no default value, then add an event handler to your link that populates that field with a value when the link is clicked. Set your Field Rule to show your other field when that "tracking" field is not empty.

$(document).ready(function(){
    $('#myLink').on('click',function(){
        $('#Field100').val('clicked').change();
    });
});

Assuming you're using custom HTML for your link, just add an ID attribute and replace "myLink" with whatever you use as the ID, and replace Field100 with the ID for your "tracking" field.

Your "declaration/confirmation" field can be whatever type you want, just set a field rule to show it when your hidden "tracking" field is Not Empty.

1 0
replied on February 26, 2020

Thanks, Jason!  I may not be able to get to this for a bit as the initial form is still in the initial planning stages, but this looks like it will work!  I will report back to the person that was dreaming up this idea and let him know that I believe we can move forward with it!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.