Forums

CC v4 Linkable Fields Tutorial

Admiral 02 Jun, 2012
In the ChronoForms DB multirecord tutorial step 7, one of the lines in the php added is for a link to a form where the target record is displayed. Can the Linkable fields in CC v4 be used for this? If so could you, based on the example in the CF tutorial provide the sample code that would go into Frontend List Settings -> General -> Linkable Field(s) to achieve the same result?

I have the list working fine, but cannot figure out how to add a link to one of the fields to take the the viewer to the form to display the full form.

Thanks!

-Donald
Admiral 04 Jun, 2012
Hi Max,
Thank you for the help! I am nearly there!
I have added the model id and field (in my case: capsvcm.CardID) into the edit fields in the front end list settings tab and the link is showing up correctly when I click on "Frontend View". I have also configured my form with the app name so that it shows up in the front form list and I have selected it. Now when I click on the listing field I am taken to the correct form (yea!!) however the form is empty. I am not sure where to tell Chronoconnectivity to pull the Record based on capsvcm.CardID into the form?

-Donald
P4R4NORM4L 05 Jun, 2012

Hi Max,
Thank you for the help! I am nearly there!
I have added the model id and field (in my case: capsvcm.CardID) into the edit fields in the front end list settings tab and the link is showing up correctly when I click on "Frontend View". I have also configured my form with the app name so that it shows up in the front form list and I have selected it. Now when I click on the listing field I am taken to the correct form (yea!!) however the form is empty. I am not sure where to tell Chronoconnectivity to pull the Record based on capsvcm.CardID into the form?

-Donald


Same here Bump^^
Max_admin 05 Jun, 2012
Hello,

Please show me the link showing in your browser's address bar when you click the edit field, it should contain the record's primary value: cb=xy

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Admiral 05 Jun, 2012
Max,
I have tried it two different ways. when I use the linkable fields I have entered this in the Linkable fields:
capsvcm.CardID:cb={capsvcm.CardID}

And then when I click on the frontend link I get the listview fine, but when I click on the Card ID link on the listform I get the view nothing, but the link looks like this:

index.php?option=com_chronoconnectivity&chronoconnection=Demo&task=cb=224

I don't think I have done this right because I do not know where to add the view_e in the form as you request in your tutorial.

however, when I add this to the edit field:
capsvcm.CardID

and click on the view frontend I get the listview (as above) and then when I click on the Card Id link I get a the detail view form but there is no data in it. the link is:

index.php?option=com_chronoconnectivity&chronoconnection=Demo&task=cc_edit_data&cb=1

The detail record should be 224, I tried adding 224 to replace the 1 but it did not work. the detail form works when I go into chronoforms and test it. It was built using the multi db record tutorial and connection between the list in chronoforms list view and detail view is "token" as in the tutorial. Should I put something else there instead? I tried deleting "token" from the form but it did not make a diference.

As you can tell, I am pretty confused at this point!

here is the debug info

Data Array:

Array
(
[option] => com_chronoconnectivity
[chronoconnection] => Demo
[task] => cc_edit_data
[cb] => 1
[Itemid] =>
[capsvcm] => Array
(
[ID] => 1
[Fname] => T. G.
[Sname] => Caperton
[Rank] => Private
[Unit] => Company K, 15th Northwest Arkansas Infantry
[State] => Arkansas
[CardID] => 224
[Hnumber] =>
[Source] => Compiled Service Records of the Confederate Soldiers Who Served in Organizations Raised Directly by the Confederate Government; (National Archives Microfilm Publication M258, 123 rolls); War Department Collection of Confederate Records, Record Group 109; National Archives, Washington, D.C.
[Comment] =>
[Side] =>
)

[cwsvcmaster] => Array
(
)

[cwsvcdetail] => Array
(
)

)
Validation Errors:

Array
(
)

Other form******************************************
Array
(
[Approx_Memory_Usage] => 4210248
[Approx_Time] => 2.36369514465
[check_permissions] => Array
(
[read] => 1
)

[SQL] => Array
(
[0] => SELECT `capsvcm`.* FROM `capcwservicerecordM` AS `capsvcm` WHERE `capsvcm`.`ID` = '1'
)

[data] => Array
(
[0] => Array
(
[capsvcm] => Array
(
[ID] => 1
[Fname] => T. G.
[Sname] => Caperton
[Rank] => Private
[Unit] => Company K, 15th Northwest Arkansas Infantry
[State] => Arkansas
[CardID] => 224
[Hnumber] =>
[Source] => Compiled Service Records of the Confederate Soldiers Who Served in Organizations Raised Directly by the Confederate Government; (National Archives Microfilm Publication M258, 123 rolls); War Department Collection of Confederate Records, Record Group 109; National Archives, Washington, D.C.
[Comment] =>
[Side] =>
)

)

)

)

-Donald
Max_admin 07 Jun, 2012
Hi Donald,

Ok, first note, your edit form's "on load" event should only have the "show html" action, because this is event to be loaded with the record data from connectivity, you may have other actions, but please make sure its working fine before trying to inject more stuff, and you should not use the form which have been used for the DBMRL tutorial🙂

Regarding the editing task, looks like the record with id = 1 is loaded fine:

[capsvcm] => Array
(
[ID] => 1
[Fname] => T. G.
[Sname] => Caperton
[Rank] => Private
[Unit] => Company K, 15th Northwest Arkansas Infantry 
[State] => Arkansas
[CardID] => 224
[Hnumber] => 
[Source] => Compiled Service Records of the Confederate Soldiers Who Served in Organizations Raised Directly by the Confederate Government; (National Archives Microfilm Publication M258, 123 rolls); War Department Collection of Confederate Records, Record Group 109; National Archives, Washington, D.C.
[Comment] => 
[Side] => 
)


What are your form's fields names ? according to the data format above, your first name field name should be:
capsvcm[Fname]
otherwise, it will not be loaded with the record data.

Now to the linkable fields issue, take our FAQs page here as an example, the topic's link is a linkable field, its using form custom task = view, the model ID = Article, and the title field = title, so I had to add:

Article.title:Title <- in the List View fields
Article.title:view&cb={Article.id}&alias={Articl.alias} <- in the linkable fields box

So, I'm adding a reference to some fields in the list view box, then use it in the linkable fields box, you will then have to add "view" in the "Custom tasks" box, so that Connectivity can load the record's data when this task is triggered, as long as there is a cb value in the data received.

I then added a new form event called "view", used a "Debugger" action to check how my data is loaded, then used a "Thanks Message" action to display my data as regular🙂

I will try to write a tutorial later today.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Admiral 11 Jun, 2012
Hi Max,
Using the tutorials you just posted I got CC to work, displaying the listing from the Master table. Thanks for that!

-Donald
Max_admin 13 Jun, 2012
Great, no problems!🙂
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.