TOPIC:

Hide input fields in editor based on a value of another field 3 weeks 1 day ago #261058

  • Topic Author
  • Maago
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 158
  • Thanks: 0
Maybe this is possible ... or not.
I want to show the user fields for input based on a "category" field in my database.
For example:
If category="1" the show field "lastname" else hide field.

Also question if this can be calculated dynamically because if it is a new record the field category is empty ..

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

Hide input fields in editor based on a value of another field 3 weeks 1 day ago #261060

  • Mirec's Avatar
  • Mirec
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 454
  • Karma: 2
  • Thanks: 19
Hi,

if I understood a well you can do it on the way that, navigate on Form and i Advanced->More Option->Form PIeces->Before Form and select type 'Custom' and insert thi code:

Step 1
$this->execPieceByName('ff_InitLib');

$db = JFactory::getDBO();
//$userid = JFactory::getUser()->id;
$db->setQuery('insert SQL Query');
$result = $db->loadResult();

ff_setValue('nameoffield', $result); 
ff_setValue('nameoffield', $result);
Instead 'nameoffield' insert name of field where value should be displayed.

Step 2

Select your Form Go Advanced and scroll down to the section 'Visibility rules' And insert this code below:
turn on element nameOfelement1 if nameofelement2 is 1

Instead 'nameOfelement1 ' insert the name of the field which should be hide/show

Instead 'nameofelement2' insert the name of the field, based on which field will be hidden/shown

Please, a field that should be hidden/shown Turns off in the Advanced option.

If you get stuck let me know and I'll help you!
Regards,
Mirko

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

Last edit: Post by Mirec.

Hide input fields in editor based on a value of another field 2 weeks 6 days ago #261112

  • Topic Author
  • Maago
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 158
  • Thanks: 0
Thanks Mirko,

but it seems your answer was for BreezingForms. I asked for CB only solution ..

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

Hide input fields in editor based on a value of another field 2 weeks 6 days ago #261114

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
Hi,

if you are using CB only, then it can be done on this way:
crosstec.org/en/forums/37-contentbuilder...-visible.html#225487

Hope this helps

Regards,
Tihana

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

Hide input fields in editor based on a value of another field 2 weeks 6 days ago #261120

  • Topic Author
  • Maago
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 158
  • Thanks: 0
Works fine. Thanks

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.049 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!