Forums

edit record doesn't work

fab4_33 13 Sep, 2009
Hello,

I'm new, I almost finish to test chronoform.

I have one issue : when I put {edit_record} in the body of chronocnnectivity, it links to a blank form and not to the record

I've set up all permissions to admin, in the back end I can edit record and save them

I 've triyed differents things found on that forum, but none seems to work

Any suggestion will help me to find a solution

Thanks a lot
GreyHead 14 Sep, 2009
Hi fab4_33,

Seems as though this may be broken. I set up an edit link yesterday but I used the direct ChronoForms link with &task=edit&sc_if={cf_id} and in the ChronoForms Form HTML checked for these values and pre-loaded the form.

A bit more complicated but it works OK for the moment.

Bob
fab4_33 16 Sep, 2009

Hi fab4_33,

Seems as though this may be broken. I set up an edit link yesterday but I used the direct ChronoForms link with &task=edit&sc_if={cf_id} and in the ChronoForms Form HTML checked for these values and pre-loaded the form.

A bit more complicated but it works OK for the moment.

Bob



Hello

I'v tried
http://www.mywebsite/index.php?option=com_chronoconnectivity&connectionname=myform&task=edit&sc_if=1


Doesn't work 😟
GreyHead 16 Sep, 2009
Hi fab4_33,

Wll you actually have to add some controller code to get it to work . . . here's what I had in my Form HTML
$task  = JRequest::getString('task', '', 'get');
$cf_id = JRequest::getInt('cf_id', '', 'get');
$fdata =& JTable::getInstance("chronoforms_bands", "Table");
if ( $task && $cf_id ) {
  $query = "
    SELECT *
      FROM `#__chronoforms_bands`
      WHERE `cf_id` = $cf_id ;
  ";
  $db->setQuery($query);
  $result = $db->loadObject();
  if ( $result ) {
    $fdata->bind($result);
  }
}

This is a little complex as it look up the ChronoForms list of table columns to set up the data object but otherwise it's straightforward.

Bob
fab4_33 17 Sep, 2009
Thank you very much. But it's too complex for me. I will try someday to get it work, for the moment I will edit my records in the back office

I almost finish to set up chronoform according to our needs

I have to check if it is possible to add a picture on every record and show that picture in chronoconnectivity

Thank you
GreyHead 17 Sep, 2009
Hi fab4_33,

OK.

You can certainly show pictures from ChronoConnectivity. Just set up an <img. . ./> tag in the body section.

Bob
fab4_33 17 Sep, 2009
thank you its works really great

I post the code to help new user like me
<?php 
{
echo "<img src='http://www.yourwebsite/components/com_chronocontact/uploads/yourform/{yourimagefield}'>";
}
?>


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