2014-09-12, 00:09:23
Hello together,
I'm new to GetSimple and try to get my first site with this CMS online.
While looking for a contact form, I found this plugin and thought it is right.
I wrote a new function to preset the subject and the template.
The sense is, some forms are only good for one thing (like a booking request or so), where
you don't need a subject field at all and don't show it, but set the field's value for validation.
To use the same plugin at the contact site, I managed to use different templates, where different fields can be displayed and the look can also be different.
The call in the pages site now is like
[sc_form set_subject="booking request" set_template="booking"]
This loads the template "booking.frontend.form.tpl" and set the subject to "booking request".
For another site it can be like
[sc_form set_template="contact"]
which just loads the template "contact.frontend.form.tpl".
or, if you add nothing
[sc_form]
the defaults "frontend.form.tpl" will be loaded.
If it will be usefull for anyone, I can tell the changes I did.
Maybe it's not high-end coding, but it work's. ;o)
Ah, I took the lastest update from the link Oleg06 posted.
So long,
moped
I'm new to GetSimple and try to get my first site with this CMS online.
While looking for a contact form, I found this plugin and thought it is right.
I wrote a new function to preset the subject and the template.
The sense is, some forms are only good for one thing (like a booking request or so), where
you don't need a subject field at all and don't show it, but set the field's value for validation.
To use the same plugin at the contact site, I managed to use different templates, where different fields can be displayed and the look can also be different.
The call in the pages site now is like
[sc_form set_subject="booking request" set_template="booking"]
This loads the template "booking.frontend.form.tpl" and set the subject to "booking request".
For another site it can be like
[sc_form set_template="contact"]
which just loads the template "contact.frontend.form.tpl".
or, if you add nothing
[sc_form]
the defaults "frontend.form.tpl" will be loaded.
If it will be usefull for anyone, I can tell the changes I did.
Maybe it's not high-end coding, but it work's. ;o)
Ah, I took the lastest update from the link Oleg06 posted.
So long,
moped