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

Question

Question

html read before allowing checkbox to show

asked on March 2, 2023

Hello all,

I have an html link to a form.  I need the user to open the link and read the form before they are allowed to check the checkbox that acknowledges the user read the form. 

I don't think a field rule will work as I need to hide the checkbox Until the html link is open.  If anyone can provide me some script/CSS for this, I would appreciate it.

Donnie

0 0

Answer

SELECTED ANSWER
replied on March 2, 2023 Show version history

Probably something like this

$(document).ready(function() {
    $("#q4 input").prop("disabled", true);
    $(".Submit").prop("disabled", true);
    
    $("#q5 a").click(function() {
        $("#q4 input").prop("disabled", false);
        $(".Submit").prop("disabled", false);
    });
});

"a" is the element for the link and #q5 is the id of the parent "li" element.  ".Submit" is the class for the submit button.  "input" is the element for the checkbox and "#q4" is the id of the parent "li" element.

The form would disable the submit button and checkbox on completion of document load, and then the "click" action handler for the link re-enables them.

 

Check out https://api.jquery.com/

1 0

Replies

replied on March 2, 2023

Are you using the classic or modern form designer?

0 0
replied on March 2, 2023

I'm using classic I believe.  Version 10.4.5.324

1 0
replied on March 2, 2023

Classic.  Donnie did select the version 10 label. Though honestly, I didn't check before I replied :)

1 0
replied on March 2, 2023

James and Jason,

 

the script James sent me works just like I wanted!  thanks for the help I appreciate your work!

Donnie

0 0
replied on March 2, 2023

He did indeed select Version 10 lol. I think it is a sign of the drastic differences between classic/modern that I'm now conditioned to ask as a knee jerk reaction.

2 0
replied on March 2, 2023

I've had to delete a few hasty replies when I realized they were on version 11.

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

Sign in to reply to this post.