Expand my Community achievements bar.

SOLVED

How to figure out the properties of field/object ??

Avatar

Level 8

Hello

I have field (say, its name is field_1) in my_form and  i am coloring yellow by using below code of initialization event:

this.ui.oneOfChild.border.fill.color.value = "255,255,191"; (Actually, just for differentiating / tracing back purpose here  am assigning this yellow color to this field, you can suggest me any thing else that marks / tags this field (i can not populate a value, bcz its visible to user), so that in the  CHANGE event of this field, again i want to check/get/know that whether this field is tagged/marked or not)

fine. But, because of some/below reason, i need to find out its color by using JavaScript, pls. let me know how to figure out its color is as yellow by using JavaScrit?

Reason: If field_1's color is YELLOW (or you suggested any tag/mark as said in the above in red text), then i have to make HIDE the field_2

Field_0's position is extreme left, Field_1's  position is middle and the Field_2's position is exterme right of the page.

I guess, i hv only one option of finding out color, hence am looking forward for JavaScript to find out the color of a field in question

(OR)

Also, pls. let me know the JavaScript that How can i make HIDE a check box for that COMLETE session (i mean, starting from launching the form in the browser until he closes the window/browser/tab/form), i guess, this idea also workes for my requirement, ( i want to put this code in the docReady event) .....no matter/what ever code is existing there in any event of that field level

Thank you

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

If you want to give a visual indicator to the user, then colouring the field yellow is probably a good approach.

However if you just want to keep track on the field, then you could test the field's value (.rawValue) and take appropriate action. In addition you can also attach a variable to an object using the <desc> element. It is a bit involved but you can find an example here: http://assure.ly/x1QObn.

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

If you want to give a visual indicator to the user, then colouring the field yellow is probably a good approach.

However if you just want to keep track on the field, then you could test the field's value (.rawValue) and take appropriate action. In addition you can also attach a variable to an object using the <desc> element. It is a bit involved but you can find an example here: http://assure.ly/x1QObn.

Hope that helps,

Niall

Avatar

Level 8

Thank you Niall.

Yes, i just want to keep track on it/field.....so i decided with COLOR option, but, the color is white (not exactly white) it self, i mean, i hv used as "255,255,254" (colored in white in docReady event), so that user would NOT see any difference in look & feel, but, for JavaScript purpose, i can track it by cross checking each fields color whether its "255,255,254" or not.

I guess, its okay idea, not dangerous.

Thank you