Clearing field decoration caused by Check Mandatory behavior

Home Forum General Clearing field decoration caused by Check Mandatory behavior

This topic contains 3 replies, has 0 voices, and was last updated by  Anonymous 8 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #411

    Anonymous

    I have a page containing a search and it runs through some logic to make sure a user has entered text into atleast one of the search boxes. If they havent they get a message and check mandatory fires on all the relevant fields and they are highlighted. That part works great, but after a user causes that behavior to fire and then fixes their search, entering text into atleast one field, I would like to clear all the highlighting. At first I thought I would just put a check mandatory at the beginning of my behavior and it would set those fields back to their default colors. But its just removing the tooltip and it looks like the only way to do this would be to use the set property behavior and manually change them all back to their default color. Is that correct or is there a clear mandatory styles behavior or something i am missing?

    #5060

    Anonymous

    In addition is there a way to change the highlight color around fields? By default it is blue and when a field has been flagged to show as mandatory it becomes red, but i cant find any documentation on how to change the highlight color. (When i say highlight color i mean the border that appears around a field after it is moused over or gains focus).

    #5062

    ijobling
    Participant

    If you use the ‘check mandatory’ you can’t change the way it works. but if you want to do something different to the standard implementation you can if you wish using the methodology you mentioned above. have conditions to test ‘if answered’ .. if not then you can use the set property behaviour to control how that field shows (and if you want to present a message to the user), and follow that up perhaps with additional behaviours on the ‘when data is changed’ on that field to set the fields back to their ‘default’ state.

    but perhaps another way to look at it is to use separate ‘check mandatory’ actions rather than checking all the fields in ONE. then the specific field not answered is highlighted, the user reviews that, and then attempts to proceed and your script iterates again passing this object and checking the next

    #5067

    Anonymous

    Yeah I think typically I would use seperate check mandatory actions, but in the case im working with right now only 1 of 3 fields is required, so I ran a simple branch to check if all of the fields are empty and if so it will run check mandatory on all 3 fields. I think this is the way to go in this instance because i want the user to know that those are the fields needed and in the message i tell the user that atleast one of those fields must contain text.

    Im ok with using the set property behavior to change, but it would be nice if set property allowed you to select multiple fields. If check mandatory isnt going to have the functionality i mentioned, than I will probably use set field in this way and since alot of fields share common properties I think we should be able to set those common properties for multiple fields from on set property action.

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

You must be logged in to reply to this topic.