Announcement

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

    How to set '*' symbol to the left of the text field?

    How to set a '*' symbol(required) left side to the textItem?
    How to display a message stating that "Employee ID is required" like this with the particular field name instead of "Field is required" when validating. I am new to SmartGWT.

    Can any one help me out of these??
    Last edited by chaitupnvs; 17 Jun 2010, 03:36. Reason: spelling mistake rectification

    #2
    Your options are to make it part of the title instead or you can setHint() and it will appear to the right of the textbox.

    Comment


      #3
      There's also requiredTitlePrefix.

      Comment


        #4
        Originally posted by svjard
        Your options are to make it part of the title instead or you can setHint() and it will appear to the right of the textbox.

        Thank you but not suitable. Actually, My requirement is to set '*' symbol just before the text field. If i set it for label, then it will be shown as just right to label and there will be some space between * symbol and the text field? Is there any other solution appropriate to my issue?

        Comment


          #5
          Originally posted by Isomorphic
          There's also requiredTitlePrefix.


          Thank you but didn't get you. Can you explain me briefly how to display "Particular TextFieldname is required" when validating if user left it as a blank?

          Comment


            #6
            You could do what you want you just need to extends CanvasItem, create either a label next to a titleless textbox or a titleless static text item next to a titleless textbox.

            setRequired(true) will show a message that the field is required when validating.

            Comment


              #7
              I'm sorry, I'm not clear with ur explanation. If i created a label as you told, it will display all the time know?
              But my concern is as u said, when validating, i want "particular field name is required" instead of default one i.e., "default field is required".


              Originally posted by svjard
              You could do what you want you just need to extends CanvasItem, create either a label next to a titleless textbox or a titleless static text item next to a titleless textbox.

              setRequired(true) will show a message that the field is required when validating.

              Comment


                #8
                That was in reply to your '*' question. FormItem.setRequiredMessage() for your other question.

                Comment

                Working...
                X