187 Posts
Pathos
10 years ago
2
Topic
Hello,

i'm trying to show a form made with RS forms in a seblod article... I show the form in the seblod content type through a field with {rsform 1}.

In rsform i can use php to change a form field with the titel of the article the vistor is on.

But i can't seem to render the title.

i used...

$formfieldname = echo $cck->getValue(art_'title');
$formLayout = str_replace('{fieldinseblodthatshowsform}', $formfieldname , $formLayout);

If i use

$meubel = test;
$formLayout = str_replace('{meubeltitel}', $meubel , $formLayout);

it works en in the form i see the word test.

Bu i want the titl of the article. So i know from what page the form is send.

Anyone an idea?

Thanks and greetings,
Joris
Get a VIP membership
693 Posts
rpoy
10 years ago
0
Level 1
Hi Joris,

for the title, try this:

your field name needs to be in quotes
$formfieldname = $cck->getValue('art_title');
echo $formfieldname;








hope that helps,

Randy
187 Posts
Pathos
10 years ago
0
Level 1
Hi Randy,

thanks. That was partly my bad.. i was trying so many options :-)

It doesn't work. Its a piece of code i have to put in rsform... and then i get this error:
Fatal error: Call to a member function getValue() on a non-object in /home/username/public_html/administrator/components/com_rsform/helpers/rsform.php(1653) : eval()'d code on line 1

But i found another way that kind of gives some info (in rsform i can get a hidden field with the url in the form. Not as nice as the actual titel. But maybe it can't use code for seblod as it is loaded through a plugin in seblod field.

So maybe it can't read the fields... Does that make sense? I'm not a programmer :-)

Thanks,
Joris
Get a Book for SEBLOD