Hi,
Is there any way to extend this function to include other Joomla fields - i.e. Meta Keywords?
Thanks!
Robert
Is there any way to extend this function to include other Joomla fields - i.e. Meta Keywords?
Thanks!
Robert
Hi Robert,
Once the article has been created the new article ID is available in the $form->data[''] array (add Debugger action to see exactly where) so you can use that to update the record with other values. I think there is an example in the forums or FAQs of changing a Category like this.
Bob
Once the article has been created the new article ID is available in the $form->data[''] array (add Debugger action to see exactly where) so you can use that to update the record with other values. I think there is an example in the forums or FAQs of changing a Category like this.
Bob
What about for CFv5? I added a debugger on my form but it doesn't display any additional info about the Joomla article that was created, only the fields that were on the form when it was submitted.
Hi Megana,
No it doesn't :-(
You can get it with this PHP in a Custom Code action provided that the title is unique
This will return the article id in $form->data['article_id']
Bob
No it doesn't :-(
You can get it with this PHP in a Custom Code action provided that the title is unique
<?php
$db = JFactory::getDBO();
$query = "
SELECT `id`
FROM `#__content`
WHERE `title` = '{$form->data['title']}' ;
";
$db->setQuery($query);
$form->data['article_id'] = $db->loadResult();
?>
Note: edit $form->data['title'] to use the name of your title element.
This will return the article id in $form->data['article_id']
Bob
This topic is locked and no more replies can be posted.