The following articles are to show, how the request form(s) can be called from within articles.
Basically there are two different forms:
- Base request-form which allows to place a request and select profession and province (form ID = 1)
- A copied form, where the profession element has been hidden (form ID = 3)
You can check the result of each form in the request list
Remark on element definitions (dropdown, checkbox, radiobuttons,...): I prefer using just lowercase letters and numbers and avoid using spaces and special characters (like Á, ó,...). These could result in problems in calculations and so on.
getQuery(true); $query ->select * ->from('request'); $db->setQuery($query); $rows = $db->loadObjectList(); $result = count($rows); echo $result;
The following is a link to the Base-Requestform (form ID = 1)
Using the copied form (form ID = 3) with profession pre-defined
index.php?option=com_fabrik&view=form&formid=3&request___profession=pintor
This approach has the disadvantage, that in the form it is not visible, what profession has been selected
Using the copied form (form ID = 3) with profession pre-defined (same form as above, just a calling a different profession)
index.php?option=com_fabrik&view=form&formid=3&request___profession=fontanero
This approach has the disadvantage, that in the form it is not visible, what profession has been selected
Using the copied form (ID = 3, same as previous form) with profession pre-defined and visible profession.
But instead of calling the form directly it links to an article with Fabriks content plugin. This way allows to show the selected profession (in title or article content)
Using the copied form (ID = 3, same as previous form) with profession pre-defined and visible profession.
But instead of calling the form directly it links to an article with Fabriks content plugin. This way allows to show the selected profession (in title or article content)