Forums

[CC V4] edit form is empty from a data list

_Remi_ 28 Mar, 2012
Hi,

Firstable, ChronoForms and ChronoConnectivity are the best component I've found. I tried to used BreezingForms and QuickForm but I will use your components. Thanks for that

I am working on Joomla 2.5. I would like to edit a single record from a data table.
1/ I created my form with CF to add a new record. That is OK 😀
2/ I created a table and I linked it with the form. That is OK 😀
3/ I created a connection with CC V4 and I can see the list of data from my table (created in CF) in the frontend. I can see also the "edit field" in the frontend. That is OK 😀
4 / Whan I click on the edit field, the good form appears in the frontend.

My problem is : the form remains empty 🤔 . The data of the record don't appear in the form.
🤨
In CF, I managed to do that with the DB record loader. But I added in the url the param. I don't know how in CC to add a dynamic param or to do something else. My aim is to modify a single record from a list view.

Thanks a lot for you answer.
Rémi
GreyHead 28 Mar, 2012
Hi Rémi,

I haven't tried this in the new ChronoConenctivity yet :-(

Is the record ientifier being passed in the URL or in the Post data from ChronoConnectivity? If so you should be able to re-load it with a DB Record Loader action.

Bob
_Remi_ 28 Mar, 2012
Hi Bob,

Sorry but I don't catch you. It's my fault I am not a web developper.
What's the "the Post data from ChronoConnectivity" ?

I tried something else today. I deleted the url parameter in the DB Record Loader of my editing form. And I used the WHERE statement in the DB Record Loader : like that cf_id=1.

So when I am in the frontend with the list view generated by CC and when I click on the field id value (Edit Field(s) in the Frontend List Settings is set on cf_id), the editing form appears with the first record (the one where cf_id=1). But you understood I want to display in the editing form the record where cf_id=3 if I click on the field id value 3.

I hope to be clear :-)
GreyHead 29 Mar, 2012
Hi Rémi,

I'm sorry, I don't know much about how the new version of ChronoConnectivity works. Is it not adding a value of cf_id to the edit url?

Bob

There are two main ways of passing data from forms 'get' which uses variables in the URL and 'post' which is the normal way that form data is submitted.
_Remi_ 29 Mar, 2012
Thanks Bob for your answer.

If you know someone who may kelp me, don't hesitate to give me the contact. I will continue to find out the solution of this headache :-) (and to post it I hope so)

Rémi
AjiJen 30 Mar, 2012
Hi Remi,

We think we were having the exact same problem and just SOLVED it. Just add a model id name in the DB Save action. Then change the names of all field names to modelid[columname]. Then go to connection manager and add this same model id in the text box of the corresponding connection.

Regards,
AjiJen
_Remi_ 02 Apr, 2012
Hi AjiJen,

You solution seems to be simple, I will try it. Just a precision :

Then change the names of all field names to modelid[columname]

- You speak about the "Parameters Fields" textbox in the parameters of the "DB save" action ?



I found another solution but more complicated than yours. I give it maybe it will help someone else one day :

In CF V4 :
- Add this code in the "where statement" textarea of the "DB record loader" action (the aim of this code is to find the id of the table record on which you have clicked in the table of the frontend) :
<?php
if (array_key_exists('cb', $_POST)) {
   $t_key= array_keys($_POST['cb']);
   $v_key=$t_key[0];
   $v_id=$_POST['cb'][$v_key];
} else {
   $v_id='0';
} ?>

cf_id=<?php echo intval($v_id);?>
I hope this code is not too much ugly but it works

In CC V4 :
- Add in the "frontend list settings" tab, in the "edit field(s)" textbox this text (it's to add a link on the ID of you record) : "cf_id" (be sure this column will appear in the "List View Fields" textbox in the same tab)
- Then in the "Font editing" tab, choose your form in the "front form" listbox.



If you want to save the modification of the record
, I don't know why but the submit button doesn't work anymore, so you need to :
- Add an event in the form (CF V4). I named it "Save". "On save" appears in the "events" tab in the "form wizard".
- Add the same "DB save" than in the "On submit" event.
- Add a "Chrono Connectivity Task" action in the "on load" event (I don't know but it works like that). A number in red appears.
- In the settings of this action, add the name of the connection created in the CC V4.
- Add the red number in CC V4 -> in the "Font editing" tab -> in "Font editing" tab -> in the "Save/Update Data Task Control" zone -> and in the "Save Action Order" textbox.
- And to finish, add in the "Save Event" textbox, the name of your new event you have created in CF V4, in my example it's "Save".

I hope I've forgotten nothing.

Regards,
Rémi
Max_admin 08 Apr, 2012
Hi guys,

Please upgrade to V4 RC2 and use the Connectivity features included, your editing form should only need a "Show HTML" action in the "on load" event, that's it, nothing more, any other configuration should be done in Connectivity and will provide the desired result, which is very simple in your case.

What you have done here is "re creating" a new save process and you didn't use the core one🙂

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
moto05 07 Dec, 2012
Hi Admin,

I have the same problem.

Can you explain me what I've to set to show data in the form?
When I click on record in frontend list I show the edit form but I don't see data to edit.
My version is 4.0 RC3.2.

Thanks
Max_admin 08 Dec, 2012
1 Likes
Hi,

Please make sure that your form fields names match the table's columns names, if you have a "Model ID" then your form fields names should be in this format:

MODEL_ID[Column_name]


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
kerberos5 26 Apr, 2013
Hi,
i have a same problem with edit function...
i use this version:
Chronoforms_V4_RC3.5.2_J1.6
ChronoConnectivity_V4_RC3.2_J1.6
joomla 2.5

i have create a form with table and i have associated a this form my connection but when i "edit" a recrod and clic submit button it creates a "new" record! :-(

I attach the screen of my configuration....

help me please!
Max_admin 01 May, 2013
Hi,

Please remove the "DB Save" from the "on submit" event, Connectivity already does this

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
kerberos5 03 May, 2013

Hi,

Please remove the "DB Save" from the "on submit" event, Connectivity already does this

Regards,
Max


I removed "DB Save" but not work! when i edit a record and click on "submit" creates a new record as I set up the form?

tnk
Max_admin 06 May, 2013
Hi,

I mean "DB Save" under the "on submit" event, this is displayed in the 2nd screenshot you posted!

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.