Hello, I search an Idea...
I would create a dropdown (with button) with selects that run events like PUBLISH SELECTED, but I'm very unskilled
I've only create
VIEWS > DROPDOWN > NAME various_events
OPTIONS
publish_selected= PUBLISH SELECTED
unpublish_selected= UNPUBLISH SELECTED
VIEWS > TOOLBAR BUTTON > NAME toolbar_button55 > LIST VIEW NAME articles_list
How can I connect first option (publish_selected) to FUNCTION publish_articles_group and second option to another FUNCTION?
Thank for you reply.
I would create a dropdown (with button) with selects that run events like PUBLISH SELECTED, but I'm very unskilled
I've only create
VIEWS > DROPDOWN > NAME various_events
OPTIONS
publish_selected= PUBLISH SELECTED
unpublish_selected= UNPUBLISH SELECTED
VIEWS > TOOLBAR BUTTON > NAME toolbar_button55 > LIST VIEW NAME articles_list
How can I connect first option (publish_selected) to FUNCTION publish_articles_group and second option to another FUNCTION?
Thank for you reply.
Can you share a screenshot of your view so I can better understand how you're organising your data?
The problem here is that the articles_list is one "form", and the select is in a separate form, so it won't have the data from both. It would probably be better to have a "publish" button and an "unpublish" button. They can both submit to the same event, just append say &action=publish or &action=unpublish to the URL and perform the appropriate action.
Thank you healyhatman for your reply. Publish and unpublish is only an example for us, I need to add at least 6 options (public/private... buy/free).
what do you mean with "separate form"?
what do you mean with "separate form"?
The "list view name" option for the toolbar button is actually referencing the name of a FORM element. When you submit a form on a website it submits ONE form element. The buttons are outside of the the form referenced by the list view name option - namely, the list (which will be wrapped inside <form> tags).
So the only way to do it is to either wrap the whole lot of it in form tags (so use a Form Area, put {view:your_buttons} and {view:your_list} inside it, and in your toolbar button set the "list view name" to the name of that parent form element, or do what I said, or make your own jQuery code to submit the value of the dropdown along with the list selections.
So the only way to do it is to either wrap the whole lot of it in form tags (so use a Form Area, put {view:your_buttons} and {view:your_list} inside it, and in your toolbar button set the "list view name" to the name of that parent form element, or do what I said, or make your own jQuery code to submit the value of the dropdown along with the list selections.
Sorry, but the list view name for me is refering to a TABLE VIEW


I need to 6 options to change these columns. Repeate, piublish/unpublish was only to do simple the ticket


I need to 6 options to change these columns. Repeate, piublish/unpublish was only to do simple the ticket
Yes, "list view name" for you references a table. But if you look at the code, you will see a <form> tag surrounding the table. So REALLY it's referencing a <form> element on the page. That's why you can put the NAME of a form area on there, and it will submit the data from the referenced form.
You can right click your table and click "inspect element" and have a look if you don't believe me.
You can right click your table and click "inspect element" and have a look if you don't believe me.
Ok. but really there isn't a way with CC6 to reach this solution? Is difficult for me think this. Can I open a ticket?
I already explained 3 options for doing it. It's not a "CC6 problem", it's a "way the internet browsers and HTML forms have been designed to work for the past 30 years" thing.
Best option: use a Form Area, put your toolbar, select, table view, everything inside it. Your toolbar button's "list view name" set to the name of the form area.
Best option: use a Form Area, put your toolbar, select, table view, everything inside it. Your toolbar button's "list view name" set to the name of the form area.
Ok, done. See below, Is correct?
Now how can I implement events with various options of select?


Now how can I implement events with various options of select?



Your read data actions {fn:} can stay outside the form area, it's the VIEWS that need to be inside it.
Put a {debug:} in the event you're submitting to, and click your toolbar button and you should be able to see all the data available to you. Use an event switcher accordingly.
Put a {debug:} in the event you're submitting to, and click your toolbar button and you should be able to see all the data available to you. Use an event switcher accordingly.
Turn off "require selection" in the toolbar button.
That data provider has an extra } at the end which shouldn't be there. And pretty sure you want {data:name_of_dropdown}
That data provider has an extra } at the end which shouldn't be there. And pretty sure you want {data:name_of_dropdown}
Your list needs to be inside the form as well
Array ( [cont] => manager [conn] => BE_gestione_galleria-toogle-copy [event] => try_dropdown [select54] => publish_selected [gcb] => Array ( [0] => 320 [1] => 321 ) [Foto] => Array ( [320] => Array ( [p_description] => galleria 2 [g_tag] => sub1 [p_cu] => Q0GREI ) [321] => Array ( [p_description] => galleria 2 [g_tag] => sub1 [p_cu] => Q0GREI ) [322] => Array ( [p_description] => galleria 2 [g_tag] => sub1 [p_cu] => Q0GREI ) [323] => Array ( [p_description] => galleria 2 [g_tag] => sub1 [p_cu] => Q0GREI ) ) [format] => html [Itemid] => 157 [option] => com_chronoconnectivity6 [view] => connection )
Array ( [switch20] => Array ( [finished] => 1 [var] => ) )
And Now?
You should be able to sort yourself out from here surely? Everything looks to be there. gcb is your selections, select54 is your dropdown (PLEASE name it something else). Your switch data source is "{data:various_events}" but you haven't actually named your dropdown that.
Sorry, I try without success.
I think switch isn't correct, but I don't know the way.
{data:various_events} take name of dropdown, is correct?
I tried the Values setup of switch in this way
{var.various_events:publish_selected}={fn:publish_articles_group}
{var.various_events:unpublish_selected}={error:saving the article failed.}
I think switch isn't correct, but I don't know the way.
{data:various_events} take name of dropdown, is correct?
I tried the Values setup of switch in this way
{var.various_events:publish_selected}={fn:publish_articles_group}
{var.various_events:unpublish_selected}={error:saving the article failed.}
{data:various_events} is wrong, because you don't HAVE any data called "various_events". Your dropdown is currently called select54.
Those value setups are very wrong. Should just be
And make sure you're actually calling the switch in your submission event with {fn:name_of_your_switch_function}
Those value setups are very wrong. Should just be
publish_selected:{fn:publish_articles_group}
whatever_the_other_possible_value_of_the_dropdown_is:{fn:other_function_you_want_to_call}
And make sure you're actually calling the switch in your submission event with {fn:name_of_your_switch_function}
This topic is locked and no more replies can be posted.