form php - insert link to record

Status
Not open for further replies.

bea

Active Member
Hi,
I run into another problem...

In my form php I get data from my form and insert a new record into a different list.
I want to insert the id as a link into the new list. The new field is called parent_id. Is it possible to format the data as a guess link?
Cheers

Code:
...
$parent_id=$formModel->getElementData('fab_cp1_line_tour___id',true);
...
$query=$mydb->getQuery(true);
$query->insert('fab_deviation_standard')
->set('parent_id = '.$mydb->quote($parent_id))
...
$mydb->setQuery($query);
$mydb->execute();
$id=$mydb->insertid();
 
Not sure what you mean.
"Guess link" is a field element feature. This can be set in the element setting in your "different list".
What is your setup (lists, relations between the lists, parent_id coming from a reapeat group? ...)
 
Hi troester,
many thanks for reply. I've managed myself by changing the field into a database join linked to the original table.
I have:
  • form A (CP1) with main information
  • form php is running on form A to insert records with relevant information into form B (Abweichungen)
  • on tabe B now 'parent_id' is linked to detailed view of record form A
Popup or new tab would be nice, but link target new window/tab under list settings doesn't work.
Cheers,
Bianka
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top