By Camaleon Developer

Create all your contact forms in a easy drag and drop way.

Download
Last Updated : 2016-07-18
(2 votes)

This plugin let you to create and insert in any place your contact forms by a single shortcode.

Each contact permit to add fields like:

  • textbox
  • checkbox
  • textarea
  • radio input button
  • selectbox options
  • url website field
  • email field
  • captcha field
  • upload field

Embed:

To embed a form in your content, you need to copy the shorcode like " [forms slug=home-contact]" and paste in any place of your content.

When a contact form was submitted, you will receive an email in your configured email and also it will be saved in to DB to see in the contact forms list.

This plugin include control and securities to avoid machine or robot submissions and also works great if you are caching the page.

Hooks:

To customize the render of fields, you can change from plugins or themes by listening a hook called "contact_form_item_render".

This hook receive a Hash a argument:

{
field: Field Object,
form: Form Object,
template: default template,
custom_class: "form-control <custom class defined in the form>", //html class for html field (select, input, ..)
custom_attrs: {id } // html attributes for the html field (select, input, ..)
}


Default template:

"<div class='form-group'>
<label>[label ci]</span></label>
<p>[descr ci]</p> //This is present only if description was defined
<div>[ci]</div>
</div>"

Where:

  • [label ci] is equivalent to label text entered
  • [ci] is equivalent to html field, maybe (input, select, ..)
  • [descr ci] is equivalent to descr text entered

Sample:

def my_theme_contact(args)
args[:template] = "[ci]" //show only field
args[:custom_class] += " animate bounceIn " //adding custom class to the field
args[:custom_attrs]["data-delay"] = "500" //adding custom attribute to the field
args[:custom_attrs]["placeholder"] = args[:field][:label] //adding placeholder to the field
end

Also you can customize the form by listening the hook "contact_form_render", this hook manage the following attributes:
form: (Form Object) The current form model,
form_class: (String) the class name for the for tag (default: railscf-form railscf-form-group),
before_form: (String) html elements to be inserted before the form tag
after_form: (String) html elements to be inserted after the form tag
submit: (String) This is the template for the submit button panel, default:

<div class='form-group'>
<button class='submit_btn btn btn-default pull-right' type='submit'>[submit_label]</button>
</div>

 

Sample:

def camaleon_cms_contact_render(args)
args[:submit] = "<label><span>&nbsp;</span>
<button class='submit_btn animate swing' data-delay='1000' id='submit_btn'>[submit_label]</button>
</label>"
args[:before_form] = "<div class='contact'> <div class='form form3 animate bounceInUp'> <fieldset id='contact_form'>"
args[:after_form] = "</fieldset> </div> </div>"
end

  1. Go to your admin panel -> plugins
  2. Enable you plugin
  3. Go to main menu -> settings -> contact form and create your contact forms.
  4. Copy the shortcode and paste in any page of your site.


contact.edit.png

contact-form-result.png

contact-form.png
  • profile

    Derekkit Derekkit

    April 04, 2018 13:05

    essay <a href= https://buyessaysoul.com >Buy Essay </a> custom essay writing "https://buyessaysoul.com" - buy cheap essay academic writing services https://buyessaysoul.com

  • profile

    Mark Siemers

    December 28, 2015 19:25

    Placing the shortcode in content works great. Is there are way to embed the forms in a view partial?