[SOLVED] Hidden fields in CB

12 years 1 month ago - 12 years 1 month ago #195455 by koschutta
[SOLVED] Hidden fields in CB was created by koschutta
Hello all,
is it possible to create a hidden field in CB that sould have follwoing properties:

When a user at registration form select in a field named 'test' the option 'ABC', the hidden field named 'hiddentest' should be filled with 'XYZ'. If the user select 'DEF' instead, the hidden field sould be filled with 'UVW'. The hidden field should not be seen by the user either in registration form nor in the Profile or Profile Edit.

How can I solve this Problem?

Thank you in advance
koschutta

Joomla 2.5
CB 1.8

Please Log in to join the conversation.

12 years 1 month ago #195528 by krileon
Replied by krileon on topic Re: Hidden fields in CB
CB has no hidden fieldtype. I suppose you could try adding one using a delimiter field and simply putting the HTML as the delimiter fields contents. However populating it is a different thing entirely.

For that you could use CB Auto Actions with a code action of JS or jQuery mode, which will append your supplied JS/jQuery to the header of the page (use before registration form display trigger). That JS/jQuery could check the select field and populate the hidden field based off value. However, this is purely JS based and there's no PHP validation to enforce it of course.

Is there a reason you need to duplicate a hidden field in this manner? Surely there's other better solutions, but will need more understand of what you're trying to do with it.


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 to join the conversation.

12 years 1 month ago #195660 by koschutta
Replied by koschutta on topic Re: Hidden fields in CB
Hello,

Thank you for your support.

The reason to use hidden fields is, that we need specifc Codes in our CRM to make a better difference between the user for sending individuality mails.

We are using a CRM which is connected via a CB plugin to joomla.

Greetings
koschutta

Please Log in to join the conversation.

12 years 1 month ago #195720 by krileon
Replied by krileon on topic Re: Hidden fields in CB
I recommend simply editing your plugin and extending it to supply what you need instead of depending on a hidden field. As for example I could use Firebug to alter your hidden field to whatever I liked without any sort of PHP side protection.


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 to join the conversation.

12 years 1 month ago #195763 by koschutta
Replied by koschutta on topic Re: Hidden fields in CB
Hello,
thank you for your answer. I think I will try your suggestion using a delimiter field.

Greetings
koschutta

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.196 seconds

Facebook Twitter LinkedIn