Good morning everyone,
I need to call the title of the ads that i put in AdsManager into Chronoform's form
Could someone help me ?
Thanks so much.
I need to call the title of the ads that i put in AdsManager into Chronoform's form
Could someone help me ?
Thanks so much.
Hi marpal87,
I have no idea what Ads Manager is or how it works. Where is the title available?
Bob
I have no idea what Ads Manager is or how it works. Where is the title available?
Bob
Hi Bob,
this is the code of the title
this is the code of the title
<h1 class="no-margin-top">
<?php
if (isset($this->fDisplay[1]))
{
foreach($this->fDisplay[1] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if (($c !== "")&&($c !== null)) {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if($field->name != 'ad_headline')
echo "<span class='f".$field->name."'>";
if ($title != "")
echo "<b>".htmlspecialchars($title)."</b>: ";
echo "$c ";
if($field->name != 'ad_headline')
echo "</span>";
}
}
} ?>
</h1>
Hi marpal87,
It looks as though perhaps you could use JavaScript to find the title in the <h1> tag and copy that to a Hidden input in your form.
Bob
It looks as though perhaps you could use JavaScript to find the title in the <h1> tag and copy that to a Hidden input in your form.
Bob
Hi marpal87,
You'd need to find a unique CSS identifier for the <h1> tag, use JavaScript to extract the ext from that and copy it to the value of a hidden input in your form.
You may need help from someone with some JavaScript and jQuery experience.
Bob
You'd need to find a unique CSS identifier for the <h1> tag, use JavaScript to extract the ext from that and copy it to the value of a hidden input in your form.
You may need help from someone with some JavaScript and jQuery experience.
Bob
Hi Bob,
I solved my problem with this code:
Now the problem is that i want a dynamic ID.
What code i have to add?
Thanks so much ๐
I solved my problem with this code:
<?php
$db =& JFactory::getDBO();
$db->setQuery('SELECT ad_headline FROM #__adsmanager_ads WHERE id="1"');
$frcchiolla= $db->loadResult();
?>
Now the problem is that i want a dynamic ID.
What code i have to add?
Thanks so much ๐
Hi marpal87,
There's nothing here to give me any clue about where the id is available :-(
Bob
There's nothing here to give me any clue about where the id is available :-(
Bob
What do you need?
I am reading this article to solve my problem..
http://www.toolboxcreations.com/articles/development/33-populating-custom-forms-with-data-from-other-components
in the end of the page there is a way to solve it but I can not make it work๐
I am reading this article to solve my problem..
http://www.toolboxcreations.com/articles/development/33-populating-custom-forms-with-data-from-other-components
in the end of the page there is a way to solve it but I can not make it work๐
This topic is locked and no more replies can be posted.