Exactly, it's an input. But it's fine for me, as I'm using it for other purpose.krileon wrote: Are you trying to add an input directly in a Custom HTML field? There will be no storage behavior for that field so that isn't going to work.
So you mean the only way to make my input required is to manually add the required class in the code as I've done?As for the required class it's checked by our validation if on an input. Icons in a field are just inline elements (spans) next to the input.
Please Log in or Create an account to join the conversation.
Just add a span element next to your input with the appropriate CSS classes.How do I add the icons?
Yes.I need to look at the code of other elements and just add those spans in the code manually?
Please Log in or Create an account to join the conversation.
So what do I need to do, to have server side validation for my input element?krileon wrote: Adding the required CSS class just triggers jQuery validation. It's not going to do server side validation.
Please Log in or Create an account to join the conversation.
Create an actual fieldtype plugin to handle the display, validation, and storage.So what do I need to do, to have server side validation for my input element?
Please Log in or Create an account to join the conversation.
Didn't understand you very well. You mean I need to create (by coding it) a new custom plugin, that adds a new field type?krileon wrote:
Create an actual fieldtype plugin to handle the display, validation, and storage.So what do I need to do, to have server side validation for my input element?
Please Log in or Create an account to join the conversation.
If you want a custom field that has customized display, validation, and storage then yes.You mean I need to create (by coding it) a new custom plugin, that adds a new field type?
No, because those are 8 and 6 year old topics that are no longer relevant. The easiest way to create a new fieldtype plugin is to use an existing one of ours as an example....Something like people have created here and here ?...
Custom HTML fields have no validation. Validation on them isn't even attempted PHP side. This is true for all calculated fields (Code and Query field included) since they have no storage behavior. I guess you could validate the raw POST value using CB Auto Actions, but that's the only thing I can think of to validate your input PHP side.In any case I don't need my Custom HTML field displayed and storaged. Only validation, that will check if there's some text in the INPUT element, when pressing the Register button.
Please Log in or Create an account to join the conversation.