Contact Form Plugin
Contact Form Plugin
Evening Folks,
I'm working on a site where I am using several instances of the Contact Form Plugin version: 1.19
If I use "Use the dynamic tpl? Standard" is sizes to mobile just fine but if I choose custom it doesn't scale properly
Any ideas where I can set the width properly?
Thank you
John
I'm working on a site where I am using several instances of the Contact Form Plugin version: 1.19
If I use "Use the dynamic tpl? Standard" is sizes to mobile just fine but if I choose custom it doesn't scale properly
Any ideas where I can set the width properly?
Thank you
John
Last edited by Imajica on Sat Feb 25, 2017 8:14 pm, edited 1 time in total.
Re: COntact Form Plugin
Do you have an URL to a live site so we can check this out? If so, please mention which one you have it currently set to. If not, please state which theme you're using. (Hint: If it's a non-public blog with a custom theme, this will be difficult to resolve.)Imajica wrote:If I use "Use the dynamic tpl? Standard" is sizes to mobile just fine but if I choose custom it doesn't scale properly
YL
Re: COntact Form Plugin
It might not have much to do with the theme you're using.yellowled wrote:If not, please state which theme you're using. (Hint: If it's a non-public blog with a custom theme, this will be difficult to resolve.)
As an explanation, Standard and Custom use different templates files to display the contact form. Most themes do not provide a plugin_dynamicform.tpl (which would be used for Custom) since it's rarely used and often needs to be adapted to the specific needs of the user anyway (read: theme authors are lazy ). So if your theme does not have a plugin_dynamicform.tpl, the plugin's default tpl will be used and most likely not match the CSS of your theme.
Do you need a customized contact form? If so, you'd need to adapt the plugin_dynamicform.tpl for your theme (we can help you with that). If you just wanted to test it and mention that it doesn't work, it's probably not worth the effort (few people ever need the dynamic form, which is why … see above).
YL
Re: COntact Form Plugin
http://www.stormscellar.com/s-mtranspor ... reers.htmlyellowled wrote:Do you have an URL to a live site so we can check this out? If so, please mention which one you have it currently set to. If not, please state which theme you're using. (Hint: If it's a non-public blog with a custom theme, this will be difficult to resolve.)
YL
the base theme is Timeline by the way
it's not live yet but this is a temp url
In this case I do need to create 2 custom forms for requesting quotes and more information
I often use custom forms for specific clients, for example the next site I am converting over is for a special olympics swim team and they use a custom form for athletes to request information and to join the team so I will need to add fields with dropdowns and checkboxes
so I may as well learn how to do it the right way
Thanks YL
John
Re: COntact Form Plugin
I must admit I'm not too familiar with the markup for Timeline, but maybe Don will chime in on this.Imajica wrote:In this case I do need to create 2 custom forms for requesting quotes and more information
I often use custom forms for specific clients, for example the next site I am converting over is for a special olympics swim team and they use a custom form for athletes to request information and to join the team so I will need to add fields with dropdowns and checkboxes
Timeline does provide a template for the standard contact form, which you find in /templates/timeline/plugin_contactform.tpl. As all Serendipity template files, this uses Smarty.
However, Timeline does not provide a plugin_dynamicform.tpl (and you may very well need multiple versions of this, I'm not sure; I usually don't need custom contact forms, so I'm not too familiar with the process), so you can copy the original from /plugins/serendipity_event_contactform/plugin_dynamicform.tpl to /templates/timeline/. Since this is not part of Timeline or the Serendipity core, it will be update-safe, i.e. not overwritten in case of an update to Serendipity.
Basically, you would need to “transport” the markup used in Timeline's plugin_contactform.tpl to the new plugin_dynamicform.tpl, using the same markup, classes etc. that Timeline uses. For example, Timeline wraps the whole contact form in
Code: Select all
<article{if $plugin_contactform_articleformat} class="post serendipity_staticpage serendipity_entry{/if}">
<!-- contact form here -->
</article>
Code: Select all
{elseif $field.type == "radio"}
{foreach name="radio_option" from=$field.options item="option"}
<input type="radio" name="{$field.id}" id="{$field.id}.{$option.id}" value="{$option.value}" {$option.default} /><label for="{$field.id}.{$option.id}">{$option.name}</label>
{/foreach}
It might be worthwhile to contact Don Chambers about this, this definitely is a task for someone who's skilled with Smarty and knows the CSS framework …
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Contact Form Plugin
Hey John. YL is correct in everything he mentions. Very easy to code a custom contact form, and I can try to walk you through it.
=Don=
Re: Contact Form Plugin
I'll give it a go and see what I can break
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Contact Form Plugin
Its a little more involved than I thought it would be. I started working on a plugin_dynamicform.tpl for timeline earlier today thinking it was10 minutes of effort.... it is not 10 minutes of effort! I will try to finish it tonight or tomorrow then update the timeline theme.
=Don=
Re: Contact Form Plugin
ok good... because I tried and yup I broke itDon Chambers wrote:Its a little more involved than I thought it would be. I started working on a plugin_dynamicform.tpl for timeline earlier today thinking it was10 minutes of effort.... it is not 10 minutes of effort! I will try to finish it tonight or tomorrow then update the timeline theme.
luckily ctrl Z is my friend
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Contact Form Plugin
I committed a change to the contactform plugin... using timeline, this is my latest idea for using the dynamic form: http://www.optional-necessity.com/demo/ ... -form.html
Submit the form as much as you want - it is assigned to a fake email address.
If all looks good, I will commit modifications to the Timeline theme, and possibly the contactform tpls.
Submit the form as much as you want - it is assigned to a fake email address.
If all looks good, I will commit modifications to the Timeline theme, and possibly the contactform tpls.
=Don=
Re: Contact Form Plugin
Don
This looks go to me so far
I'll test it on my site as soon as it's uploaded
I'll assume it will pick up the recaptcha, if enabled?
John
This looks go to me so far
I'll test it on my site as soon as it's uploaded
I'll assume it will pick up the recaptcha, if enabled?
John
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Contact Form Plugin
Recaptcha is introduced via a "hook"... should work just fine. I will try to update github tonight or tomorrow. Make sure you also update your contactform plugin..... I updated that a day or two ago.Imajica wrote:Don
This looks go to me so far
I'll test it on my site as soon as it's uploaded
I'll assume it will pick up the recaptcha, if enabled?
John
=Don=
Re: Contact Form Plugin
Hey Don.. did the updated form get uploaded to git?
I can't seem to find it
John
I can't seem to find it
John
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Contact Form Plugin
I was trying to squeeze a few other updates into the theme files... but I will try to upload the THEME files for the contact form plugin modifications.
=Don=
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Contact Form Plugin
I updated the Timeline theme on github. It now includes plugin_dynamicform.tpl.
=Don=