xtform
xtform copied to clipboard
seperate tooltip element
This is a nice new feature.
But this does not place a red border round the element.
Is it possible to add a class like "xt-error" to the element indicated for the seperate tooltip. So: xt-validation-tooltip="groupSelector" would result in a class on the element groupSelector that indicates that it is in error and some css can be added.
Is this related to the other question regarding css Sykes? You can use the built in angular classes to control this.
I don't think so. I have a DIV that I give a xt-validation-tooltip="field1" field1 also has a xt-validation-tooltip. When I test I can see that the class xt-error-container is added to the DIV but it is there alway's. I also see the angular ng-invalid and ng-dirty classes on field1 as I manipulate the data. But when I manipulate the data there is no change in classes on DIV. So how am I supposed to indicate that that an error has occurred ? By the way the tooltip is also not appearing. I don't know if it is relevant, but field1 is inside DIV.
I discovered that the trigger for the tooltip is still on the validated field and NOT on the element with the tooltip. As the tooltip appreas on click I have to click the field to get a tool tip on something else.
And as I have been using this on hidden fields to indicate errors within groups of fields I did not see anything.
So it worked different that expected.
As there is only a change in the tooltip element when the tooltip is opened or closed this can not be used for attaching css for error colors