- Posts: 7
- Thank you received: 0
preselect with variable $this->lists['main_category_id']
- Starker
- Topic Author
- Offline
- New Member
Less
More
3 years 10 months ago #140949
by Starker
preselect with variable $this->lists['main_category_id'] was created by Starker
Hello everyone, in the file "simple.php" there is the entry "echo $ this-> lists ;". How can I use a variable (e.g. $ area or category ID) to pre-select existing elements? I can't find a solution. Can you help me? Karsten
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #140956
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic preselect with variable $this->lists['main_category_id']
Hello
I guess you create a menu item to link to Submit Event - Simple Layout menu option? In that menu item, there is a parameter called Default Category. Select the category you want there and it should work as expected
Regards,
Tuan
I guess you create a menu item to link to Submit Event - Simple Layout menu option? In that menu item, there is a parameter called Default Category. Select the category you want there and it should work as expected
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Starker
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 years 10 months ago #140965
by Starker
Replied by Starker on topic preselect with variable $this->lists['main_category_id']
Good morning Thuan, thank you very much for your quick reply. It's a little different. I work with OS Service Booking and Event Booking. We link both with one another. For our project, that makes more sense than just a solution. In this way, data is transferred directly to simple.php (create a new appointment) to pre-fill the form. That works great, only with one point I don't get any further. The category that was transferred with the category ID or name should be preselected. I can't find a solution. Best regards, Karsten
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #140975
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic preselect with variable $this->lists['main_category_id']
Hello
Could you please explain more details about the issue you are having?
Maybe give me URL of the page which you want the category to be pre-selected so that I can understand your actual request and guide you with a solution?
Tuan
Could you please explain more details about the issue you are having?
Maybe give me URL of the page which you want the category to be pre-selected so that I can understand your actual request and guide you with a solution?
Tuan
Please Log in or Create an account to join the conversation.
- Starker
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 years 10 months ago #140977
by Starker
Replied by Starker on topic preselect with variable $this->lists['main_category_id']
You can find our website at
jamidoo.com
. When a passenger makes an appointment request, the pilot can see it in an overview. The passenger requests a specific flight region and time. From the overview, the pilot can go directly to "Event Booking" and create a new appointment. This means that other passengers can also book directly for the appointment. In the form "simple.php" (... templates / worldbiz / html / com_eventbooking / event / ..) there is the entry "echo $ this-> lists ;" This shows the categories, in our case the flight areas. If the data is transferred to the simple.php, the correct selection should also be made here. That's my problem. I hope I could explain it clearly.
Karsten
Karsten
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #140981
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic preselect with variable $this->lists['main_category_id']
Hello
Maybe you can get this file, unzip it, upload the received file to components/com_eventbooking/view/event folder on your site
Then you can pass ID of the category you want via main_category_id variable URL. For exampel domain.com/submit-event-url?main_category_id=10 will make category with ID = 10 selected on that page
Tuan
Maybe you can get this file, unzip it, upload the received file to components/com_eventbooking/view/event folder on your site
Then you can pass ID of the category you want via main_category_id variable URL. For exampel domain.com/submit-event-url?main_category_id=10 will make category with ID = 10 selected on that page
Tuan
Please Log in or Create an account to join the conversation.
- Starker
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 years 10 months ago #140991
by Starker
Replied by Starker on topic preselect with variable $this->lists['main_category_id']
Thanks for your answer Tuan. Unfortunately it wasn't working. I tested again. The data is transferred to the simple.php and inserted into the fields. This is not a problem. Only the pre-selection of the category (dropdown: echo $ this-> lists ) does not take place. But when I edit an existing event, the preselection takes place. It's complicated, but the solution is probably very simple. I just can't find it.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #140998
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic preselect with variable $this->lists['main_category_id']
What's the URL of the page which you tried?
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Starker
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
3 years 10 months ago #141004
by Starker
Replied by Starker on topic preselect with variable $this->lists['main_category_id']
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
3 years 10 months ago #141007
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic preselect with variable $this->lists['main_category_id']
No, I need the link which you redirect users to submit event form. I want to check that link and make sure you pass the main_category_id properly in the URL
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.