Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

× Contact Enhanced is a contact component manager created to replace Joomla! core contacts component and add lots of advantages and new features (see Features ) and it offers many plugins and modules for several different purposes,
Product page | Documentation Page

More form fields after dropdown selection

1 year 10 months ago #26284 by FlyingMarkus
Good day,

When an option is selected from the dropdown list, more form fields should appear.

Only the form fields that were created for the respective option should appear.

How can I implement this?

Screenshot: prnt.sc/3dERzln6OE9z

Many greetings,
Markus

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

1 year 10 months ago #26285 by support
Dear Markus,

I'm not sure what you mean. Can you provide a direct link to your form?
Also, which Joomla and Contact Enhanced versions are you using?

Best regards,

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

1 year 10 months ago #26286 by FlyingMarkus
Good evening Douglas and thanks for the answer!

The user should select an option via a dropdown form. When he has choose an option should be opened the associated form fields that were not previously visible.

I use Joomla 3.10.8 and CE 3.10.1

Form: www.deutsche-mitflugzentrale.de/tagesausflug-pilotenangebot

As example: If the user choose the option in red box the blue box should be opened: prnt.sc/v8bltHJz5Np0

Best regards,
Markus

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

1 year 10 months ago #26288 by support
Dear Markus,

In order to implement what you need, it will require a little bit of Javascript. For more information, you can read this article .

The article above only has the example for Select list when using Joomla 4. In Contact Enhanced for Joomla 3 you can create a Javascript Form Field type with the following content:
jQuery(function($){
   // The FIELD ID of the SELECT list
  $('#ce-cf-container-FIELDID select').on('change', function(){
    if($(this).val() == 'Other' ){
      // The FIELD ID of the field you want to Show/hide
      $('#ce-cf-container-FIELDID').css('display','block'); 
    }else{
      $('#ce-cf-container-FIELDID').css('display','none'); 
    }
  });
});

Have a blessed weekend,

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

1 year 10 months ago #26324 by FlyingMarkus
thanks for the answer!
In which field comes the dropdown field ID and the select ID?

Best regards,
Markus

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

1 year 10 months ago #26325 by support
Markus,

I'm not sure what you mean.
The Comments (line in dark green) already indicate which is the Select ID and the field you want to hide/show.
Is that what you wanted to know?

Best regards,

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

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback