Unsure about behavior with fieldErrors and Bootstrap 3.
Unsure about behavior with fieldErrors and Bootstrap 3.
Using Bootstrap 3 and DataTables is beautiful. However, I have 1 question about its behavior in case of field errors.
It gives not only the input field the 'danger' color but also the parts editor.field.fieldInfo (data-dte-e="msg-info") and editor.field.message(data-dte-e="msg-message").
At least I would not expect this for the fieldInfo part, as it is neutral in the error issue and now "shouting" for attention, while I thought that the attention is especially needed for the errorMsg.
See image:
https://ibb.co/n6PeVb
This question has an accepted answers - jump to answer
Answers
The Editor Bootstrap 3 example doesn't seem ti exhibit that behavior. If you click "New", leave all fields blank and click Create you will see the error "This field is required" for first and last names. Nothing extra.
Looks like you are using a tabs when creating records. Wonder if there is something with that config causing the issue. Can you try without tabs as a test?
Someone else may have seen this and have an answer. If not can you provide a test case showing the issue?
Kevin
@kthorngren
Thanks for your reaction Kevin. I have the example files on localhost. If I add the following line to the Editor Bootstrap 3 example:
editor.field("first_name").fieldInfo("Info about the field first_name");
it will appear in read also if I do not enter a first name.I added the 'extra' text.
Here the example you named with the fiedlInfo line appended:
I see, I understand your question now - missed the fieldInfo part. The fieldinfo text ("Unique hostname") is changed to red.
Will let Allan or someone else more knowledgable answer the question of how to change this.
Kevin
Its a good point!
This is being caused by the fact that the field container element (
div.DTE_Field
) is being assignederror
andhas-error
classes, which means that Bootstrap will highlight everything inside it as in error state.As a workaround you could use:
I'll get that added in for the next release, as I agree that it shouldn't be highlighted like that.
Regards,
Allan
@Allan another workaround I am using is the following:
The classes "alert" and "alert-info" will prevent that an error will change the color of fieldInfo. There is only 1 price as "alert" will occupy more space, but for me, it is exactly as I like to have it, but you can remove "alert" and work with only "alert-info".