Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to enable Submit button only if user has provided input in Sugarcube 2

Hi,
I am using Sugarcube 2.0.

I want user to:
1. Select an option from multiple radiobuttons (without automatically checking any radiobutton by default)
2. Enter text in a textarea (this can be optional or mandatory based on game setting)

I would like to enable the SUBMIT button only if they have selected one radiobutton, and entered text in textarea (if is mandatory as per setting).

How do I do this?

Thanks in advance

Comments

  • I hope I can get some help with this
  • I kinda cheated a solution for this (as there is probably a more elegant solution to be had). But I assigned each of the required variables a default value, and if the default value was picked up on the next passage (after the submit) it would come up with a warning to the player that all required fields needed to be entered and take them back.

    I know it's not exactly what you're after, but after seeing the post not getting much love I thought I'd chime in with what I had done on a similar attempt.
Sign In or Register to comment.