Forums

[SOLVED] How to save frontend listview edits?

skittle 08 Jun, 2013
This seems like it should be very simple. Am I missing something obvious?

I am using Chronoconnectivty to provide a frontend listview of records that have been entered using a few ChronoForms. My list of data appears as expected. I have defined a number of the fields (in the Data Listing Fields option on the Frontend Listings/General tabs) to be editable from the frontend listing. So far, so good. The defined fields appear in the frontend listing and allow for editing right in the view. So my question is, after I have made the edits, how do I save them. (It seems like perhaps a _Save_ option for each row might do the trick but I can't find this function.) I have tested my frontend listing with the _DELETE_ option and it works fine.

So how can I have a function that saves frontend edits right from the frontend listing? (I do not want to load the form, make the edits and hit submit.)

Thanks in advance for any assistance you can provide.

John
Max_admin 13 Jun, 2013
Hi John,

Please try "_SAVE_LIST_:1" in the toolbar buttons list

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
skittle 14 Jun, 2013
Thanks very much Max!

John
skittle 21 Jun, 2013
Hi Max,

I have tested the _SAVE_LIST_ function without success. I have implemented it in my view (using the same technique that I successfully use to display the _EDIT_ function). I have enabled frontend editing of the data and I can change the values in the the view as expected. However, when I click on Save (my link to _SAVE_LIST_) the screen refreshes, and I end up back at the site homepage. When I return to view the data values I changed, they are back as they were before my edits (no changes were saved).

I have tested the _EDIT_ function and it works fine - it opens the appropriate Chronoform with the correct data. I have tested the _DELETE_ function and it works fine as well.

So now I have two questions. First, why does _SAVE_LIST_ redirect me to my website homepage? (It should keep me on the current view.) Second, what can I do to make _SAVE_LIST_ actually save a record.

FYI - I am using the most recent versions of Chronoforms and Chronoconnectivity.

Thanks for your help Max.

John
Max_admin 21 Jun, 2013
Hi John,

That's strange, what's the url in the browser bar when you get redirected ?

Do you have any fields named "option" ?

How many fields do you have in your list ? try to minimize the number, for example test with a small list, 1 or 2 rows only.

You must tick (the checkbox) of any row with changes done for the data to be updated.

If you can't get it to work and this is a very vital feature for you then you may also contact me through the "Contact us" page to get V5 beta, but it has a different interface and doesn't integrate with CF yet, you will have to build your own form code if you need to edit the records, and will need to do few tests before you get it working, but its much more powerful in general.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
skittle 22 Jun, 2013
Hi Max,

Thanks for your quick response. This was my mistake. I thought that I could use the {_SAVE_LIST_} function in a Save column of my custom listing and then click on the that to save my edits. Once I put the checkboxes back in my listing, I am able to check the appropriate box and hit the Save button on the Toolbar and it almost works perfectly.

The final piece of the puzzle is how to get it to return to the screen I was on before the Save and subsequent refresh. Currently, after I click Save, the screen refreshes the page I am on but loses the variable (in the URL) that filters my custom list. So after each Save event, I am left with an empty custom listing. How can I send the variable through after the Save event so that I am returned to the same filtered custom listing?

Thanks again for the excellent support!

John
Max_admin 04 Jul, 2013
Hi John,

Apologies for the delay!

I'm afraid this may not be possible without a core code change/hack, or did you find a different solution already ?

But if you have a custom listing then you may add a hidden field in the header with the param name, that should store the passed param value.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
skittle 05 Jul, 2013
Thanks Max,

I confess, I don't understand your suggestion. I am using a custom listing but am unclear on how to incorporate your idea into the header. Currently, the header in my custom listing contains some CSS, some Java functions, some php, and html. I even have some code in it that manipulates the parameters in the URL. It is not beautiful. But it works!

I am not sure what you mean about the hidden field in the header. I can assign a value (of the parameter) to a variable in the header section of my custom listing. And if I want I can display that variable on the screen in the header portion of my custom listing (or i can hide it so it does not display). But these variables won't persist after a page refresh (which happens after the Save button is pressed). So this doesn't sound like what you are referring to. Please explain in more detail how I can use a hidden field in the header.

Thanks for your help Max.

Regards,
John
Max_admin 14 Jul, 2013
Hi John,

Apologizes, this is a bit late!

Just add a hidden field in the header section with the same name of your parameter, it should preserver its value, assuming its inside the form tags of the listing.

If this doesn't work then you may try to code this using sessions or something else!

The new CCv5 has this feature already, but its completely different, let me know if you want to try it.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
skittle 14 Jul, 2013
Hi Max,

I struggled a bit but finally managed to solve this using sessions.

Thanks for you help!

John
This topic is locked and no more replies can be posted.