Hello dear Bob, thank for your patience,
I think in the end of this theme is necessary for you not a beer but a bottle of wine (Italian of course) ...
I think your link is not:
<a href='index.php?option=com_chronoforms&chronoformname=XXX&cids={cf_id}&Itemid=263'>[ Edit details ]</a>
but
<a href='index.php?option=com_chronocontact&chronoformname=XXX&cids={cf_id}&Itemid=263'>[ Edit details ]</a>
Is so or is my mistake ?
If I use first link don't run, if I use second link (my first method) I can open the form but don see the data from the selected record by {cf_id}.
When I open form from Chronoconnectivity, for example my "anagrafica" list, when I click on "edit" the instanced link is:
/index.php?option=com_chronoconnectivity&connectionname=bta_anagrafe_list&task=editrecord&cids=517
and it run. This instance call the chronoconnectivity component, bta_anagrafe_list connectionname, TASK editrecords and record 517;
BUT if the connected table is a "VIEW" the system don't run.
Please, follow me, please:in Phpmyadmin:
FIRST TABLE:CREATE TABLE IF NOT EXISTS `aaa_anag` (
`id_anag` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
PRIMARY KEY (`id_anag`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
INSERT INTO `aaa_anag` (`id_anag`, `name`) VALUES
(1, 'Giuliano'),
(2, 'Bob');
SECOND TABLE:
CREATE TABLE IF NOT EXISTS `aaa_bike` (
`bike_id` int(11) NOT NULL AUTO_INCREMENT,
`brand` varchar(50) NOT NULL,
`anag` int(11) NOT NULL,
PRIMARY KEY (`bike_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
INSERT INTO `aaa_bike` (`bike_id`, `brand`, `anag`) VALUES
(1, 'Montesa', 1),
(2, 'Ossa', 2),
(3, 'Bultaco', 2),
(4, 'Sherco', 3);
THE VIEW:
CREATE VIEW aaa_bike_VIEW AS SELECT
aaa_anag.anag_id,
aaa_anag.name,
aaa_bike.bike_id,
aaa_bike.brand,
aaa_bike.anag
FROM aaa_anag
INNER JOIN aaa_bike
ON aaa_anag.anag_id = aaa_bike.anag
2) In Chronoconnectivity create a new connection named AAA_LIST, connected table are "aaa_bike_VIEW";
- In "Body": {name} {brand} {edit_record};
- in front end Group Permission: Administrator, Administrator, Administrator, Administrator;
- Record Edit form: nothing;
- In FrontEnd Per User Permission: Giuliano (ONLY IN VIEW, no select new,edit,delete);
- In Backend Data View Settings: all;
- I ignore this:
The connected table does NOT have a primary key, please add a primary key to your table or some functions will not work correctly ;
- I publish the connection;
3) make a new menu voice call AAA_LISTA and call the connection "AAA_LIST";
4) I see the result
Giuliano Montesa
Bob Ossa
Bob Bultaco
And (naturally) I don't see the link for "editor".
5) In Chronoform create the "insert form for anagraphe", named aaa_bikes :
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Bike ID</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_3" name="bike_id" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Brand</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_2" name="brand" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">Anag ID:</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_1" name="anag_id" type="text" />
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="button_2" type="submit" />
</div>
<div class="cfclear"> </div>
</div>
NOW THE BET:
Click on Edit on the list and open the aaa_bikes forms with editable data.
My first idea is this, in AAA_LIST:
<p> {name} {brand} <a href='index.php?option=com_chronocontact&chronoformname=aaa_bikes&cids={cf_id}'>[ Edit details ]</a> </p>
... and don't run ...
Giuliano