Hello,
I am working on my first homepage and my first form with chronoforms. Thanks to many good videos I got pretty far. But now I have no clue what I did wrong. Please excuse my english - I am not so good at it. Hopefully I am able to explain my problem properly.
I made a registration form for a gathering. I have guests staying in the hotel and guest joining on different days..
So I made a drop down menu where the user is able to choose daily stay or over night stay and added an event which opens a checkboxgroup for the daily guest when selected. This is working fine so far. If the user chooses "Tagesgast" the checkboxgroup will ask for the days: Donnerstag, Freitag, Samstag, Sonntag.
Checking the days "Freitag", "Samstag" and "Sonntag" other checkboxgroups for each day will open. This is working fine, too. When the user also add "Donnertag" all undermenu from the other days dissapeare.
I tried to add an event to "Donnertag" but it won't change the problem.
I don't want the undermenu to dissapeare. How can I fix it?
Hi Yosemit,
Please check that you nave the names correct - in your post you have both Donnertag and Donnerstag
If that isn't the problem can you post the Event settings, or take a Form Backup using the icon in the Forms Manager and post it here so I can take a closer look.
Bob
Thank you, Bob!
here is the form backup, i hope i did right.
Hi Yosemit,
I don't think that it is working I only get changes when I click 'Bitte nur die nachfolgenden Optionen anklicken' which presumably should not be an option.
The problem is that the ChronoForms Events code isn't clever enough to handle multi-select events like CheckBox Groups and Multi-Select drop-downs. Unfortunately they still have to be hand coded.
Single Checkboxes work OK though so you could redesign the form with a single checkbox for each of Donnerstag, Freitag,
Samstag and Sonntag that shows/hides the associated elements for that day.
Bob
Thank you again Bob,
I inserted the option 'Bitte nur die nachfolgenden Optionen anklicken' for testing and because I couldn't finde my mistake an I had no other solution... So if a ChronoForms Events code isn't clever enough I will leave it like it is now.π
I now have two more questions.
Would it be possible to limitate the use of the Form? I don't want people to register more then once for the Weekend.
And would it be possible to limitate the number of bookings - i only have a certain number of room.
Hi Yosemit,
To stop people re-applying you have to have some way of identifying them. If they log in that's simple, if they don't then you can run a check on say their email address to see if that has already been used.
To limit the number of places save the bookings in a DB Table then use an Event Switcher action in the start of the form On Load event to check how many places are takes. If there's still room show the form, if not show a message.
Bob
Hi Bob,
all members have to register by joomla login form and have to be confired by me.
Can I use the event switcher when I want the form to load for all and only check the selected type of room?
Yasmine
Hi Yosemit,
If they are all registered then I would use the Authenticator action to limit access to the form to logged in users, then you can check their User id against the saved records to see if they have already submitted.
Bob
Hello Bob,
thank you so much for your help.
I found the Authenticator action and it seems to work, but it is still possible to register many times. How do I tell it check the User id against the saved records? I am not familar with codes at all, its my first time trying to do a form.
How do I tell the Event Switcher action what to check?
Yasmine
Hello Bob,
I am not familar with codes at all and i don't know what to do with them either....
I added a custom code to the Authenticator action and copied your the code above into it and got the following error:
Fatal error: Call to undefined method JUser::id() in /users/nordseetreffen/www/administrator/components/com_chronoforms5/chronoforms/actions/custom_code/custom_code.php(20) : eval()'d code on line 7
So I thought I might have to change the term "FROM `#__some_table" to the table I use saving the form, but I still get the same error.
Hi Yasmine,
Please try $juser->id without the () and, yes you do need to add your own table name.
Bob
Hi Bob,
thank you very much for trying to help me.
I tried now diffent ways with the code, but nothing worked like i wanted it. I gave up, because I just don't understand what to do and where my mistake isπ
Yasmine
Hi Yasmine,
By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.
Bob