function “validateSimpleForm” in the CSBO “SF_Validate”

  • Leonid Gauss
        Has successfully completed the online course Intermediate (200)
        Has successfully completed the online course Basics (100)
      1 year ago #38124

      Hello,
      I have extended the standard Simplifier registration in an app with a couple of additional fields for the address, i.e. street, house number and so on and my goal is to have a red asterisk in front of it in the text label for all fields. The fields from the standard Simplifier registration – i.e. salutation, first name, last name and e-mail – already have red asterisks in front of them, if I activate “required” for the new additional fields I created, the red asterisk also appears in front of them, but then in the registration an error message appears: “TypeError:e.setValueState is not a function”. This happens because of the function “validateSimpleForm” in the CSBO “SF_Validate”. What is this function about and how can I avoid this error? Thanks a lot in advance.

      Greetings Leonid

      Armin Winkler
          Has successfully completed the online course Introduction
          Has successfully completed the online course Intermediate (200)
          Has successfully completed the online course Advanced (300)
          Has successfully completed the online course Basics (100)
        1 year ago #38153
        Up
        0
        Down
        ::

        Hi Leonid,

         

        the CBO function expects the required property to be set on the input widgets that are to be validated, not on the label. Please set your additional fields required like this and the BO should run without any errors. The background here is that in our script we are checking on all required fields for the SimpleForm and if there’s any error, the valueState property of the corresponding widget should be set to ‘Error’. Therefore if labels are marked as required, it won’t work because labels do not have a property called ‘valueState’.

         

        Kind regards,

        Armin

      Viewing 2 posts - 1 through 2 (of 2 total)

      You must be logged in to reply to this topic.