hiding field when the page is loaded

kraadde 31 Jan, 2025

Max

I have a dropdown set up like that:

=

option 1

option 2

....

Event trigger set as follows

value in  /  Option 1  /hide_datei_flyer

value is not in  / Option 1  /  show_datei_flyer

document ready /  /  hide_datei_flyer

  Field Datei_flyer

has an event listener:

hide_datei_flyer      action: hide

show_datei_flyer     action: show

and an event Trigger:

document ready /  /  hide_datei_flyer

what I expect to happen is that the field datei_flyer is hidden when the page is loaded.

It is not happening and the field is always shown at page load.

How to fix?

I could send you some screnshots, but the post does not accept any of the file format I tried🤨

Or also a form download if you prefer.

Thanks

Max_admin 31 Jan, 2025

you can post screenshots by just pasting, or uploading a file in the image icon:

hiding field when the page is loaded image 1

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 31 Jan, 2025

Thanks but always erroe message shows up 

File extention is not allowed, please choose a different file.

Let me know what file extention is accepted. I tried png and jpg without success

Max_admin 02 Feb, 2025

.png and .jpg should be ok, I have just tried it, what is the name of the file you are trying to upload ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 02 Feb, 2025

The file namers are

dropdown_1.JPG (115kb) and dd2.jpg (27kb)

Regards

kraadde 02 Feb, 2025

It is quite difficult to explain everything. However, I could send you a CF7 form download which is what I more or less need.

Could that be possible?

Max_admin 03 Feb, 2025

Hi kraadde

I tested this directly on v8 here:

hiding field when the page is loaded image 2

hiding field when the page is loaded image 3

the dropdown is set to hidden on page load, if this does not work for you then your page may have a javascript error, please check the browser's console:

hiding field when the page is loaded image 4

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 03 Feb, 2025

Max. There may be a misunderstanding. There is no error message in the console.

But,

I have a dropdown. The default option is empty, the following 14 options are to be selected by the user.

One ( or more) fields shall be shown or hidden based on the selected dropdown option. If empty, every other fields or areas should be hidden.

All this works in CF7. You may check this with the bak file that I sent you.

Max_admin 03 Feb, 2025

ok, let's start with the "Document ready" trigger, does it work ? does it hide the field on page load ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 05 Feb, 2025

Max, here the event trigger settings of the field datei_flyer, corrected as instructed. This version I have already tried but as you can see it does not work as expected.

Here tha page loaded:

Max_admin 05 Feb, 2025
Answer

I missed something, as per the Note, all conditions of a trigger must be met before the trigger is fired, so using "hide_datei_flyer" with document ready may not work because the options condition should also be met

You will need a 2nd trigger, maybe call it "hide_datei_ready", and add this new trigger to the same listener which has "hide_datei_flyer"

hiding field when the page is loaded image 5

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 05 Feb, 2025

Max still not working. see below.

kraadde 05 Feb, 2025

Sorry now it works. I missed the saving before trying.

Now the following problem remains: how to hide an area (container or multi field area) at page loading? It has only a listener and therefore no trigger to set up hiding at document ready.

How to solve that?

Max_admin 05 Feb, 2025

Now the following problem remains: how to hide an area (container or multi field area) at page loading? It has only a listener and therefore no trigger to set up hiding at document ready.

Use a trigger in a different view, like any field, and keep the listener in the area

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 05 Feb, 2025

Like this? It does not work. The container always shows at page loading.

BTW, could you update in such a way that the area tags remain visibel like all other fields. Would be easier editing the form setup.

Max_admin 06 Feb, 2025

yes, that's how it should work, just tested it here

Can you make the Trigger name simpler ? like "hide1" ? and did you use this trigger name anywhere else ?

Does the page have any Javascript errors in the console ?

BTW, could you update in such a way that the area tags remain visibel like all other fields. Would be easier editing the form setup.

What are the Area tags ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 06 Feb, 2025

All fields have a name which remains visible after saving the form design.

The areas only shows the name while editing and disappeares after saving. See below.

This makes it very difficult to edit  the design.

and did you use this trigger name anywhere else ? Yes I used also elsewhere to achieve the same, hiding that area. Is that not aloowed?

and no I can not see any error message in the console

Max_admin 06 Feb, 2025

and did you use this trigger name anywhere else ? Yes I used also elsewhere to achieve the same, hiding that area. Is that not aloowed?

All trigger conditions must be met before it will be fired, you have one condition which is "Document Ready", what other conditions do you have ?

Why do you need the Area name ? that's something internal and is not useful for Views, it's mainly used for Actions

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kraadde 06 Feb, 2025

Max,

Why do you need the Area name ?

Because I need to show/hide a group of fields and therefore I should be able to properly address the area concerned.

Like in CF7, see below. But maybe there is another solution that I do not know yet?

Adriano

Max_admin 06 Feb, 2025

no, the area name is not needed for showing/hiding, only the trigger name matters, and you are free to choose any trigger name

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.