How to insert a module or an article into a form

24 Nov 2011 10:19 - 24 Nov 2011 10:45 #1 by Demis [Fox-Labs]
How to insert a module or an article into a form was created by Demis [Fox-Labs]
You can show Joomla modules at the top or at the bottom of your forms.
This article applies to forms created using Fox Contact component (menu items).
It should work for forms created using Fox Contact modules, but it may result in strange layout depending on your css rules, because you are about to incorporate a module within another module.

Step 1: Install required extra extensions
"Content Load Modules" plugin {loadposition} won't work, because it loads modules within articles, and your form is not an article.
Download and install "Modules Anywhere" extension.
Otherwise, if you plan to embed a Joomla article within your form, you'll need "Articles Anywhere" extension.

Step 2: Prepare your module to be incorporated
Create your own module or article to be placed inside your form, and keep note of its Name, and ID.

If you are about to create a module, assign its position to any value that doesn't exist on your template. Example: "Position: hidden".

Step 3: Insert the module inside your form
Edit your contact form, inserting a call to the article or the module prepared, within "Form Fields" > "Page top text" or "Page bottom Text" fields.
Use the syntax { module ID } or { module Name } if you want to insert a module. Example { module 74 } or { module My embedded Module }
Embedding articles require a more complex sysntax { article ID }{ title }{ introtext }{ /article }. Refer to the official "Articles anywhere" manual page for further detals.

Please Log in or Create an account to join the conversation.