form inside article

gp1179

New Member
Hi all,

I have a form in an article.
Is it possible by submitting the form to include the article title in the data listing in the database?

Thank you
 
Thanks it worked fine.
I wonder now how to bring the title of the article because i have only the id
 
Or (once it is defaulting to the correct ID) you could simply try changing the element type from a field element to a database join, pointing at the J! content table, with key set to 'id' and label set to 'title'...
If you want to display the title (in any fabrik form/list) this should do.
If you literally want to store the title (as string, which may be nor unique) you can get it in the eval
$id=JRequest::getInt('origid', 0);
$db =&JFactory::getDBO();
$db->setQuery("SELECT `title` FROM `#_content` where `id` =$id");
$title
= $db->loadResult();
return $title;
 
Thanks for the answer but for some reason it doesn't work.
It brings the value 'please select'

What setup i have done?
Database join plugin
Eval options yes

In the default area this
$id=JRequest::getInt('origid', 0);
$db =&JFactory::getDBO();
$db->setQuery("SELECT `title` FROM `#_content` where `id` =$id");
$title = $db->loadResult();
return $title;

table the r8pen_content
value--> id
label--> title


Is something that i am missing about this configuration?
 
If you are using the dbjoin element just return the id (as you've done it) and set "Show please select"=no;
 
I made and this change and always brings the same code (wrong code of the article).
It is the first code from the drop down list.
So i think something else i am missing...
 
I dont find a solution.
Maby i have to put something In the "Joins where and/or order by statement (SQL)"
area?
 
If you've set your element to databasejoin return the id:
$id=JRequest::getInt('origid', 0);
return $id;
 
Thank you very very much!!!!!!!!!!!
Thats the solution!!!

i was looking for hours how can be done.

Great!
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top