NetTalk Central

Author Topic: how to enable/disable buttons ?  (Read 3188 times)

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
how to enable/disable buttons ?
« on: August 14, 2013, 06:06:08 PM »
Bruce,

I have a tabbed form and I would like to disable the NextButton until the user clicks a checkbox.  The buttonset appears to be jquery .  Does NT provide a way to conditionally set the CSS on these buttons to enable/disable them? I assume there's a way to do this since the PreviousButton is only disabled on the first tab. 

I could probably figure out which nt classes to switch if I knew how to switch them.

Thanks

Alan Schoolcraft

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: how to enable/disable buttons ?
« Reply #1 on: August 14, 2013, 11:54:11 PM »
Hi Alan,

There's an easy answer, and a harder answer, but lt's start with the easy one. This isn't exactly what you want, but it's close.

1. On the form options - go to the Validation Tab and turn on the option
Wizard : Validate Tab on Next

2. Add some custom embed code to "require" the checkbox to be set. ie, assuming the field is called say Inv:Paid
in the

ValidateValue::Inv:Paid  Routine
  If Inv:Paid <> 1
    loc:invalid = 'Inv:Paid'
    loc:alert = 'Please click on the Paid checkbox before continuing'
  End


In some ways this is a better solution than just disabling the Next button because it explicitly informs the user what they have to do in order to proceed. Just disabling the Next button prevents them from continuing, but they don't necessarily know why.

If this approach is ok for you, let me know.

cheers
Bruce
   

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: how to enable/disable buttons ?
« Reply #2 on: August 15, 2013, 03:15:59 AM »
Thanks Bruce, your suggestion is better   :)
Alan Schoolcraft