Skip to Content Skip to Menu

Custom HTML field multilanguage description

  • mk3
  • mk3
  • OFFLINE
  • Posts: 137
  • Thanks: 2
  • Karma: -1
6 years 11 months ago #300111 by mk3

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.

Exactly, it's an input. But it's fine for me, as I'm using it for other purpose.

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.

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?
How do I add the icons? 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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 11 months ago #300115 by krileon
Replied by krileon on topic Custom HTML field multilanguage description
Adding the required CSS class just triggers jQuery validation. It's not going to do server side validation.

How do I add the icons?

Just add a span element next to your input with the appropriate CSS classes.

I need to look at the code of other elements and just add those spans in the code manually?

Yes.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: mk3

Please Log in or Create an account to join the conversation.

  • mk3
  • mk3
  • OFFLINE
  • Posts: 137
  • Thanks: 2
  • Karma: -1
6 years 11 months ago #300120 by mk3

krileon wrote: Adding the required CSS class just triggers jQuery validation. It's not going to do server side validation.

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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 11 months ago #300150 by krileon
Replied by krileon on topic Custom HTML field multilanguage description

So what do I need to do, to have server side validation for my input element?

Create an actual fieldtype plugin to handle the display, validation, and storage.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • mk3
  • mk3
  • OFFLINE
  • Posts: 137
  • Thanks: 2
  • Karma: -1
6 years 11 months ago #300160 by mk3

krileon wrote:

So what do I need to do, to have server side validation for my input element?

Create an actual fieldtype plugin to handle the display, validation, and storage.

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?
...Something like people have created here and here ?...
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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
6 years 11 months ago #300186 by krileon
Replied by krileon on topic Custom HTML field multilanguage description

You mean I need to create (by coding it) a new custom plugin, that adds a new field type?

If you want a custom field that has customized display, validation, and storage then yes.

...Something like people have created here and here ?...

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.

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.

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.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: mk3

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum