Jump to content
Sign in to follow this  
tscmedlake

Show/Hide Update Button on Details form based on checkbox

Recommended Posts

I'm am trying to conditionally display the Update button on a Details form based on the toggle of a boolean check box on the data page.  The java scrip I have in the footer looks like this:

<script type="text/javascript">
/* 1 - get the Yes/No field */
var cb_boolean = '[@field:BO_Approved]';
if (cb_boolean == 'No') 
{
/* Hide The Update button*/
document.getElementById("Mod0EditRecord").style.visibility = 'hidden';
} else { 
/* Show The Update button*/
document.getElementById("Mod0EditRecord").style.visibility = 'visible';
}
</script>

The script does hide the button but it is not revealed when the Checkbox (BO_Approved) is checked.  What am I missing.

Thanks in advance

 

Share this post


Link to post
Share on other sites
On 8/11/2017 at 4:15 AM, tscmedlake said:

I'm am trying to conditionally display the Update button on a Details form based on the toggle of a boolean check box on the data page.  The java scrip I have in the footer looks like this:

<script type="text/javascript">
/* 1 - get the Yes/No field */
var cb_boolean = '[@field:BO_Approved]';
if (cb_boolean == 'No') 
{
/* Hide The Update button*/
document.getElementById("Mod0EditRecord").style.visibility = 'hidden';
} else { 
/* Show The Update button*/
document.getElementById("Mod0EditRecord").style.visibility = 'visible';
}
</script>

The script does hide the button but it is not revealed when the Checkbox (BO_Approved) is checked.  What am I missing.

Thanks in advance

 

You may have a look at this post. I use script from that post in my datapage and it works like a charm

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...