Add input value to submit gcb

webcrea 19 Sep, 2018
Hi,

On a table with selector for each line.
I try to add an input field ( field_shipped_date)

and a toolbar_button
in URL : shipped_date={data:field_shipped_date}
event : shipped

Impossible to pass the shipped_date
Array
(
    [conn] => crmenrollmentsdev
    [event] => shipped
    [limit] => 15
    [gcb] => Array
        (
            [0] => 13511
            [1] => 13510
        )

    [Itemid] => 2648
    [option] => com_chronoconnectivity6
    [view] => connection
)
Thanks
healyhatman 19 Sep, 2018
Oh hang on I get what you mean. What's the field called, how have you actually named it?
healyhatman 19 Sep, 2018
There are two "Name" fields. Try calling the first one field_shipped_date and the second one field_shipped_date[{var:tablename.row.model.id}]
webcrea 19 Sep, 2018
Hi,

The field's name is field_shipped_date

The event is
{fn:read_programs}
{fn:read_providers}
{fn:read_sessions}
{fn:read_enrollments}
<h2>Enrollments List</h2>
{view:filtres}
{view:paginator_enrollments}
{view:toolbar}
{view:list_enrollments}
{view:paginator_enrollments}
<h3>To manage enrollments, please select 1 row at least, informe input and click...</h3>
{view:toolbar_shipped}
{view:field_shipped_date}

If i put in view:form the field and the toolbar button. The field_shipped_date is correctly passed to the evant but not the gcb !!
webcrea 19 Sep, 2018
Nothing field_shipped_date[{var:list_enrollments.row.enrollments.id}]

But i don't understand your goal.

there is only one field
I would run a function on each selected row
healyhatman 19 Sep, 2018
I just tested out doing what I said in the second message and it works as expected.[file=10989]Test_19_Sep_2018_12_35_37.c6bak[/file]
healyhatman 19 Sep, 2018
If you meant one field outside the table then that works too. What you need to do is have a Form element, with your toolbar buttons and table view call inside that. Then have your toolbar button send the form view instead of the table view.
healyhatman 19 Sep, 2018
Like this[file=10990]Test_19_Sep_2018_12_44_39.c6bak[/file]
healyhatman 19 Sep, 2018
Actually small mistake sorry - the toolbar buttons don't need to be inside that wrapper form unless you want to send the value it holds.
webcrea 19 Sep, 2018
Only one filed with one toolbar button like this
Add input value to submit gcb image 1
healyhatman 19 Sep, 2018
Yep so the table and the field need to be inside a form wrapper, and your toolbar button where it says "List view name" should hjave the name of the form wrapper instead of the name of the table. See my second demo form.
webcrea 19 Sep, 2018
It's like you said but if I put it in the form, at the same level of the list, only gcb passed.

If i put it in another form with the field field_shipped_date and type in "URL and/or URL parameters" = shipped_date={data:field_shipped_date}
Only the field_shipped_date is transmit.

Do you understand? In one case i have gcb in another case only the date :-(
healyhatman 19 Sep, 2018
Why would you put it in the url parameter? Did you look at the demo form I uploaded?

Also Also: putting that in the URL parameter will set the URL when the page loads, it won't send new data.
webcrea 19 Sep, 2018
Exactly I try with URL parameter when toolbar_button is inside the main form. Idea is to catch the shipped_date_field with gcb
healyhatman 19 Sep, 2018
Yes I get that I can't help you if you're not going to look at the second demo connection I made for you.
webcrea 19 Sep, 2018
Yes that's work
Thanks
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger