FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

JM Contact plugin - Frog CMS contact form with different fields

Feed 10 posts, 5 voices

Avatar
180 posts

Hi, evryone!

This plugin help you to create mail form with different fields. Fields and e-mail template you can set at “Administration/JM Contact” page.

First – create e-mail template!

Go to the “Administration/JM Contact” (or Settings) page. Than press button “Create template” at sidebar.

Put custom template name and template content with data placeholders. For example:

Hi! This message come from site.
=== Personal data ===
Market: {market}
Company: {company}
Contact person: {person}
Phone: {phone}
E-mail: {email}
Address: {address}
City: {city}
Zip: {zip}
Country: {country}
Message:
{message}
With the best regards, {person}.

How to create form?

Go to the “Administration/JM Contact” (or Settings) page. Than press button “Create form” at sidebar. You see next fields:

Form name – Simple form name for forms list
Form identifier – This identifier should be unique
Sender e-mail
Recipient e-mail
E-mail subject
E-mail template – Select template from templates list
Success message text – This message will showed when form sended successfully
Send button text – “Send” button text

Form fields – You can add one or more form fields by button “+ Add new field”. You can remove last field by button “- Remove field”.

Each field contain second labels:

Field name – Text of field label
Identifier (CSS class) – This identifier you already use when you create template (placeholders)
Note text – This text showed when field have some errors
Field type – You can select one type of them: “Text”, “Textarea”, “Select”, “Checkbox”
Default content – If you select text – you have one-line text field. If you select other field type you have multiline field. Each line of multiline field is item of “Select” or “Checkbox”.

Add form to page

You can insert form to page by follow code:

<?php jm_contact_form($this, 'contacts_en'); ?>

Where contacts_en – is form identifier.

Plugin in action


Download plugin

http://frogcms.in.ua/public/plugins/jm_contact/frogcms-jm_contact-0.1-beta.zip

 
Avatar
9 posts

What a great plugin.

Thanks jMas!

 
Avatar
180 posts

I forgot about fron-side css for form.

/* JMContact */

.jmc-form { border:1px solid silver; background:#fff; padding:15px;
}

.jmc-p { overflow:hidden; margin:15px 0 !important;
}

.jmc-label { float:left; display:block;
}

.jmc-label i { font-style:normal; color:red; margin-left:3px;
}

.jmc-p span { margin-left:130px; display:block;
}

.jmc-p-error { color:red; border:1px dotted red; padding:5px 10px; margin-left:-10px !important; margin-right:-10px !important;
}

.jmc-textarea { width:99%; height:90px;
}

.jmc-text { width:80%;
}

.jmc-select { width:81%;
}

.jmc-send-button { padding:3px 5px;
}

.jmc-send { margin-bottom:0 !important;
}

.jmc-errors { background:#ffc5ae; margin:-10px -10px 0 -10px; padding:10px;
}

.jmc-errors p { margin:5px 0 !important; color:maroon;
}

.jmc-checkboxes em { display:block; font-style:normal;
}

.jmc-success { background:#c1ee5f; margin:-10px -10px 0 -10px; padding:10px;
}

.jmc-success p { margin:5px 0 !important; color:green;
}

 
Avatar
26 posts

Also works fine with Wolf 0.6.0.
Two errors in JmContactController.php though, on lines 248 and 264:
public public function form_delete( $form_id ) and public public function form_copy( $form_id )

Obviously both have a “public” to many.

 
Avatar
180 posts

@fortron, thanks for testing. Soon I’m releasing new version with bugfixes and few futures.

 
Avatar
26 posts

Since your also post on the Wolf forum:
why not release a official Wolf plugin?
I needed to add some vars to the sidebar only:
<?php echo PLUGINS_URI;?>/jm_contact/images/form_edit.png

 
Avatar
180 posts

@fortron, becouse I developed Frog version, and do not work with Wolf CMS (only do simple tests)…

Maybe I release and Wolf version to. ;)

P.S.> I have some more critical Frog CMS tasks now. Thatwhy I do not work with Wolf.

 
Avatar
1 posts

I’ve tried but have constraints. message did not get to email. previous thank you. please help

 
Avatar
3 posts

Hi i use this plug in but when i send the message… i always get just
name:{person}
message:{text}

and so on… no a real contact message can somebody helpme :D thx

 
Avatar
180 posts

Hi! Uhh… I’m forgot about this topic and this plug. :)
But I can help you.

Can use template, that I put in first message?
Version of Frog is latest?

 
Avatar
3 posts

yeap now it’s working i dunno may be i made something wrong. :D