Forums

Edit modulcontent with Chronoforms

ryulariat 29 Mar, 2017
Hi!
I'm searching for a solution but i don't know, if this is possible with chronoforms.

I want to edit the content of a modul using a chronoforms formular. The link to the website: Link

I want to edit the content of the modul "Bespielbarkeit" on the right side. Here you can see, if it is possible to play on a court (green) or not (red). Now everything is red because the season didn't start yet.

Now I want to have a formular for a logged-in-user with a checkbox for every court and of course a submit button. If I activate the checkbox for court 1 and 2 an click "submit", in the frontend should be shown the color green.

Is this possible?

Thank you
Walter
Max_admin 29 Mar, 2017
Hi Walter,

If the courts data are stored in a database table then the form can do this, but you must know the table structure and make your form fields names match the names of the table fields.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ryulariat 02 Apr, 2017
Dear Max!
Thanks for your hint, I could made it with a Chronoforms formular, Chronoconnectivity and the Connectivtiy Plugin. It's working really fine. I could post the way i made it, if the communtiy is interessted in.
I've just one last question, which is a bit offtopic: If I hover a row in the frontend, the background color changes. Could you tell me how I can switch that off?

Thank you once again for your help
Walter
Max_admin 02 Apr, 2017
Hi Walter,

You did this with v5 or v6 ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 11 Apr, 2017
Hi Walter,

Apologizes for the late reply.

The table has a class named "table-hover", that class will have to be removed, the only way to do this is using some JavaScript on page load:

<script>
jQuery(document).ready(function($) {
$('.table').removeClass('table-hover');
});
</script>

The code needs to go in the header section of your table.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ryulariat 14 Apr, 2017
Hi Max!
No problem, thank you for all your help.
I have (hopefully one last) problem. I use joomgallery for my pictures and there must be a conflict between the connectivity and the joomgallery. Always, if I show pictures by the category view, the background-color of the connectivity rows changes in the hovered-color.
Do you have an idea to fix this?

Thanks
Walter
ryulariat 14 Apr, 2017
Answer
1 Likes
An one post more: here is the way I did it. For experts of course not a big thing, but maybe there's a newbie who finds help with this.

As I posted a few days ago I did this with Chronoforms V5, Chronoconnectivity V5 and the plugins of forms and connectivity.
First of all I created the form, my form is only used for editing data.
In the designer I used a hidden label with field name and field id "cf_id" and field value "1" (thats important for editing the right row). Then I used the Radioboxes with the names court1, court 2 and court3 and the options "0=nichtbespielbar" and "1=bespielbar". The last thing I used was of course a submitbutton.

This was only the design of the form, before I went to the setup, I had to create a table for the. So we create a table at the forms manager. I only needed the fields "cf_id", "court1", "court2" and "court3". So I unchecked all the other fields.

Now I was able to do the setup for my form. First of all I used a "DB Read" to look out the current data of the table. It's important, that the DB Read is before the HTML Render form. Now go to edit DB Read, enable it and take the right table.
The second field is the HTLM Render form, but here I didn't edit anything. This two fields are in the On load.
The last field is the DB save, which you have to put in the On submit. There I had the biggest problems with the code in the update-conditions field. I used this code:
<?php
return array("cf_id" => $form->data["cf_id"]);
?>

Now my work at the form was finished and I had to bring the data in the frontend of my website.
So I changed to Chronoconnectivity and created a new connection.
At register "General" I only set the connection name and published: yes.
At models you have to give your model a title, this title you will need in the front list settings. At table name I selected the table I created at chronoforms. At "Fields" and "Order" I wrote all the fields of the table (cf_id, Verein, court1, court2, court3).
The last thing I had to do was the front list settings.There I selected Display type: table.
At columns list I wrote the fields I wanted to show. There it's important to write the modeltitle before the fields as you can see at the hint under the field.
At "binary" I wrote all fields, which should be able to change by my form.
The work in the connectivity was finished now and I only had to show the connectivity in the frontend. But this was easy. I installed the connectivity plugin and wrote this code in a costum module
{chronoconnectivity5}nameofthemodel{/chronoconnectivity5}
.

Walter
Max_admin 14 Apr, 2017
Hi Walter,

Thank you for this guide!🙂

In my opinion, for such a small list of data, and for maximum control, you could use a "custom" list, you would be able to control the output HTML to make it exactly as you want, you can of course keep the list as table and experiment with the custom code until you reach the desired output, you can switch between the Table and Custom views in the Connection page.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.