Hello,
I have been happily using Chronoforms for years, but I’ve now run into an issue.
In Chronoforms 7, I could easily use the {document:title}
shortcode to retrieve the title of a page. Is this option also available in version 8? I haven’t been able to find it.
I discovered that with Read Data, I can fetch the title from the content table, but this retrieves all titles, whereas I only need the title of the page where the form is being displayed via a module. This title is the car type, which is automatically filled in for the applicant.
How can I solve this in Chronoforms 8? In version 7, this was much easier using {document:title}
.
I look forward to your response.
Thanks in advance!
Best regards, Ron
Hi Ron
You can use this code in a PHP action:
$document = Joomla\CMS\Factory::getDocument();
return $document->getTitle();
then you can use the action variable:
{var:php_action_name}
I will also add this to the next v8 update shortcodes so that you can still use {document:title}
Hi Max,
Thanks for your response!
Could you explain to me step by step how this works? Or is there perhaps a (video) guide available? I’ve never done this before.
I’d like the text field to automatically display the title (the car brand), as my website features more than 200 cars.
Looking forward to your reply. Thanks in advance!
Best regards, Ron ๐๐
No problem ๐, it should look like this:
then use {var:php7} but the next update should have the {document:title}