Hi,
I am using CCV4-3.2 and CFV4-3.5.
I have a list of rows made of three JOINs, all tables having model names.
I added a new column in List View Fields "...,Flag:Flag,..."
In Linkable Fields added "Flag:setFlag" and nothing more.
On the front form I added an event "setFlag" in which added two actions "Custom Code" and "Redirect User".
The main code of "Custom Code is SQL query like that:
My problem is there is no $form->data structure inside front form event available.
If I set the value for static id number query works great so the rest of the code is OK.
What is the way to get the parent row values in the front form event?
You guys helped me so many times so I believe the answer is coming shortly.
Regards
Henryk
I am using CCV4-3.2 and CFV4-3.5.
I have a list of rows made of three JOINs, all tables having model names.
I added a new column in List View Fields "...,Flag:Flag,..."
In Linkable Fields added "Flag:setFlag" and nothing more.
On the front form I added an event "setFlag" in which added two actions "Custom Code" and "Redirect User".
The main code of "Custom Code is SQL query like that:
$query = "UPDATE exampletable SET flag=1 WHERE cf_user_id = ".$form->data['slu']['cf_user_id'];
My problem is there is no $form->data structure inside front form event available.
If I set the value for static id number query works great so the rest of the code is OK.
What is the way to get the parent row values in the front form event?
You guys helped me so many times so I believe the answer is coming shortly.
Regards
Henryk
Hi bighen,
I found this a bit hard to understand first thing in the morning :-(
If you are using a ChronoForm then the $form->data array certainly exists in the front-end On Load event (and any other event). Add a Debugger action to the event to see what is in the array.
Bob
I found this a bit hard to understand first thing in the morning :-(
If you are using a ChronoForm then the $form->data array certainly exists in the front-end On Load event (and any other event). Add a Debugger action to the event to see what is in the array.
Bob
Hi Greyhead,
I have a code that calls front form correctly using $form->data structure perfectly.
I need more than that ie the link available at each row of CCv4 standard table doing the SQL query - actually the same way the edit form is called.
I managed to pass control to the front form event however there is no $form->data structure to use...
Now I'm thinking how to pass the record id to this event somehow...
Regards
Henryk
CFV4 debugger in the custom event shows:
I have a code that calls front form correctly using $form->data structure perfectly.
I need more than that ie the link available at each row of CCv4 standard table doing the SQL query - actually the same way the edit form is called.
I managed to pass control to the front form event however there is no $form->data structure to use...
Now I'm thinking how to pass the record id to this event somehow...
Regards
Henryk
CFV4 debugger in the custom event shows:
Data Array:
Array
(
[Itemid] => 216
[option] => com_chronoconnectivity
[task] => UstawUczestnikAkcji
[lang] => dane-opiekunow
)
Validation Errors:
Array
(
)
Hi bighen,
What are you trying to do ? maybe I can suggest a different way.
Regards,
Max
What are you trying to do ? maybe I can suggest a different way.
Regards,
Max
Hi Max,
First I need the list of user data, ###_users joined with other files which contain a few status flag binary fields. I's quite easy with CCV4.
Clicking on one of the columns will go to the front form with some data enabled for edit.
That's easy part done and working.
Now I need to set the status field with a short PHP script which first checks the other fields condition then changes the flag or comes with the message. Clicking on label-only column value should call the event with that code.
I know how to make the binary fields easy editable on the list.
I don't want to allow freehand edit on the list (click on read/green icon to switch it over) cause some sets of flag values are not valid.
My problem is like storing hair coloour data
bald=0/1
blond=0/1
Obviously bald=1,blond=1 does not make sense, right? :-D
That's why I need to set this values with the script.
Regards
Henryk
First I need the list of user data, ###_users joined with other files which contain a few status flag binary fields. I's quite easy with CCV4.
Clicking on one of the columns will go to the front form with some data enabled for edit.
That's easy part done and working.
Now I need to set the status field with a short PHP script which first checks the other fields condition then changes the flag or comes with the message. Clicking on label-only column value should call the event with that code.
I know how to make the binary fields easy editable on the list.
I don't want to allow freehand edit on the list (click on read/green icon to switch it over) cause some sets of flag values are not valid.
My problem is like storing hair coloour data
bald=0/1
blond=0/1
Obviously bald=1,blond=1 does not make sense, right? :-D
That's why I need to set this values with the script.
Regards
Henryk
Hi,
As a plan B I'm gonna add the button on the edit form with AJAX action bound to it.
OK I know how to do it with Custom Listing...
To make CC more powerful option to add a button as a column in CC connection view would be superb.
Regards
Henryk
As a plan B I'm gonna add the button on the edit form with AJAX action bound to it.
OK I know how to do it with Custom Listing...
To make CC more powerful option to add a button as a column in CC connection view would be superb.
Regards
Henryk
Hi Henryk,
I think that you could do this fairly easily using the Custom Listing boxes. It does take more work - but you get a lot more flexibility.
Bob
I think that you could do this fairly easily using the Custom Listing boxes. It does take more work - but you get a lot more flexibility.
Bob
Hi Henryk,
Apologies for the late answer!
The custom listing should help here as Bob has already posted, you might have used the "Auto list event" for auto listing, I think that I have explained how to use it in few other posts.
Anyway, a new Connectivity version is almost complete with new possibilities, with the ability to control cells output and more, let me know if you want to test the beta through the contact us page, it can work with the current version without problems!🙂
Regards,
Max
Apologies for the late answer!
The custom listing should help here as Bob has already posted, you might have used the "Auto list event" for auto listing, I think that I have explained how to use it in few other posts.
Anyway, a new Connectivity version is almost complete with new possibilities, with the ability to control cells output and more, let me know if you want to test the beta through the contact us page, it can work with the current version without problems!🙂
Regards,
Max
This topic is locked and no more replies can be posted.