Forums

Include form in php?

Maurice Foppen 23 Sep, 2010
Hi!

I want to include a specific chrono form in a php template. Its all Joomla! So the form is just created in the backend.

I know when i use an article i can use this code:{chronocontact}test{/chronocontact}

What would the code when i want the form include in a div that will be rendered by an php-file.

<?php echo ; ?>

Thanks in advanced!

Greetings,
Maurice
GreyHead 24 Sep, 2010
Hi Maurice,

I've no idea - never tried to do this.

Does this work?
<?php echo "{chronocontact}test{/chronocontact}"; ?>


Bob
Maurice Foppen 25 Sep, 2010
Hi Bob,

No i already tried that. But i really like to know what will work๐Ÿ˜‰.

It's that handy, because when you create for example a productcatalog... than you can put this code in a div in a specific template... so when you create an item in the backend... automatically the form will be include... so you have an answerform with each product.

I have an hidden field thats links dynamicly to the that specific product... all works perfect!!! But now i want to see how i can include a regular chrono form created in the backend to a specific template.

Hope you have a idea ๐Ÿ™„ ..

Thanks for the response by the way๐Ÿ˜‰.

Greetings,
Maurice
nml375 25 Sep, 2010
Hi Maurice,
I don't suppose using the ChronoForms module in a custom module position would suffice?

Otherwize, check the source for the module, and you'll see a decent example on the needed php-code to display a form.

/Fredrik
Maurice Foppen 25 Sep, 2010
Thanks Fredrik,

I tried that too๐Ÿ˜‰. To look at the module code... but iam not a real code guy... this is the code

What part do i need to put in my specific template... works this with an include???

Can somebody give me a clue?

Thanks,
Maurice
This topic is locked and no more replies can be posted.