Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Dynamic form validation one or the other required

    SmartClient Version: v8.2p_2012-04-07 (smartgwtee-3.0p)

    I have to form fields that I can't setup to required in the ds.xml file because the user most select one or the other. Currently my form is automatically validated by using the conditions in the ds.xml.

    How can I add some validation to the form so it is automatically validated in this exclusive or condition.

    #2
    Use a serverCustom validator for server-side enforcement, and optionally add a custom Validator if you want client-side enforcement too.

    Comment


      #3
      Thanks,

      I also have a visual clue for required field which is a red '*'. I would like to have a similar visual indicator for this exclusive or fields. They appear next to each other in the same row but The only way I can think of is two enclose them with a red border. Is there any way to change the border color for a row
      in the DynamicForm?

      Comment


        #4
        Some hacks with 3-side borders and cellStyle might get what you want, but you probably want to use CanvasItem to embed a subform and use isGroup:true to create a border around them, then a ValuesManager to make them all one logical form for the purposes of saving.

        Comment

        Working...
        X