Forums

Delete multiple data with gcb[]

webcrea 06 Apr, 2017
Hi,

Selector are present in the list and i created a toolbar_button with view to "delete event"

"delete event" contains {fn:delete_maData}

delete_maData is a delete function with reference to my table where i want to delete data

I don't know "Delete conditions" must contains and when i click on delete button the debug in event view show nothing interesting. There isn't gcb[] array

Sure I forgot something but what ?
Max_admin 06 Apr, 2017
Hi Chris,

Similar features are included in the demo projects, its easier to check how they work and apply the same config to your project.

The "delete data" function must get some conditions, if selectors are present in the list then you can test the values passed to the "delete event" using the "Debug" command: {debug:}

If the gcb is passed then you can use this in the delete conditions:

id/in:{data:gcb}


Assuming gcb is an array.

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
webcrea 06 Apr, 2017
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''' at line 1 SQL=DELETE `maData`.* FROM `#__mesData` AS `maData` WHERE `id` IN '';

gcb is not passed

Where is demo project please?

best regards
Max_admin 06 Apr, 2017
Hi Chris,

What are the buttons you have under the "Connections manager" ? if you have one called "Custom project" then please click it, if not then just click "New" and the demos list will appear.

The error means that the gcb is not passed, there are something which may cause this, what is the "Checkbox field name" under the "Selector" view ? and whats the value ?

Your toolbar button view has "Submit button" option enabled ?

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
webcrea 07 Apr, 2017

Hi Chris,

What are the buttons you have under the "Connections manager" ? if you have one called "Custom project" then please click it, if not then just click "New" and the demos list will appear.Max



ok fine,

The error means that the gcb is not passed, there are something which may cause this, what is the "Checkbox field name" under the "Selector" view ? and whats the value ?Max



selector_item
Checkbox field name=gcb[]
Value={var:read_mesData.row.mesData.id}

selector_all (it works)
Checkbox field name=gcb[]
Value=

Your toolbar button view has "Submit button" option enabled ?Max


yes
Link parameters=gcb={var:gcb[]}
List view=read_mesData

And now i have "nothing selected" in pop up when i click on delete button!!

Best regards,
Max_admin 07 Apr, 2017
Hi Chris,

The "link parameters" of the toolbar button don't need to have anything here.

But I'm not sure why it's not working for you, do you have the page online so I can check it ?

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
webcrea 07 Apr, 2017

This is private content

Max_admin 07 Apr, 2017
Hi Chris,

I don't have the login info or maybe I can't find it, could you please send them again ?

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
webcrea 07 Apr, 2017

This is private content

Max_admin 07 Apr, 2017
Answer
Hi Chris,

2 errors but the same problem:

First, the toolbar "list view name" should point to the "view name" which is the "table view name" "view_mesData" in your case.

#2, the selector "Value", the selector is called inside the table view and it also uses the table view name "view_mesData".

Once those were fixed, it worked!

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
webcrea 07 Apr, 2017
Super
Thanks a lot Max
You're the best
This topic is locked and no more replies can be posted.