jan-vince / smallcontactform Goto Github PK
View Code? Open in Web Editor NEWCustom contact form builder plugin for OctoberCMS.
License: MIT License
Custom contact form builder plugin for OctoberCMS.
License: MIT License
Setup a standard contact form with four fields:
All data comes through and gets saved in the database except for the email field which returns the following error:
SMALL CONTACT FORM WARNING: Found a non-defined field in sent data! Field name: Email_Address and value: [email protected]
Any idea?
Thanks,
Dan
Hi, first off, like this plugin so far, it's very easy to use! I'm having one issue though, and it may be something dumb I'm overlooking since I'm new to OctoberCMS.
I have a simple contact form and the form is sending and submissions are being logged in the back end, but no emails are reaching my email inbox.
In Mail Configuration I have the Sender field filled out and the Mail Method is set to PHP Mail (I tried other methods and they didn't work, either). In the plugins options, under the Email tab I have Allow Notifications set and the Send Notification Email field filled out. Admin is the only user and email is set there as well.
Any help is appreciated, but apologies ahead of time if this was a simple fix I was too oblivious to find, haha.
Hi, how i can add upload field to form? How this is implemented in the Magic Form
Great job on this plugin @jan-vince!
Could you add it to Packagist so that we can add it to our October instances with
"jan-vince/smallcontactform": "dev-master"
added to our composer.json files?
Invalid argument supplied for foreach()
...../plugins/janvince/smallcontactform/models/Settings.php line 321
i read that it was fixed, but i still get it on v. 1.4.3
How do I custom control-label css class? seems cant find how to do it.
It should be similar like the custom CSS class.
I want to export contact form listing from CMS. Any idea how to do that?
I am using invisible version of reCAPTCHA and getting this kind of error:
ReCAPTCHA couldn't find user-provided function: contactForm::onFormSend
when trying to send request (clicking SEND button)
$output[] = '<button type="submit" data-sitekey="6Ldf9FUUAAAAAFEhx3nu-K2A807YBisJxf3-VGRK" data-attach-loading data-callback="contactForm::onFormSend" class="g-recaptcha oc-loader '
. ( Settings::getTranslated('send_btn_css_class') ?
Settings::getTranslated('send_btn_css_class') : e(trans('janvince.smallcontactform::lang.settings.buttons.send_btn_css_class_placeholder')) ) . '">';
My language (Hungarian) have some special characters, for example: á é ö ü
The html_entity_decode function convert them. So the sending email doesn't look good.
As the title says, I am getting two of every form submission as long as "Enable AJAX" is checked. Otherwise seeming to work just fine. Any thoughts, maybe just a configuration issue?
See octoberrain/drivers-plugin#5 (comment)
for a fix when using Mailgun and PHP 7.2
smallcontactform requires octoberrain.drivers when using Mailgun as sender but this will throw an error with PHP 7.2
"ErrorException: count(): Parameter must be an array or an object that implements Countable in (...)/drivers/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:67"
The error was fixed in guzzle 6.3.3 but octoberrain.drivers only goes up to guzzle 6.2.0 because of flysystem-rackspace requirements. So removing flysystem-rackspace from the composer.json allows update to go to guzzle 6.3.3
Hello,
I need to add another css class for the submit wrapper. It should be similar like the field wrapper.
Thanks
I have this error.
El manejador de AJAX 'contactForm::onFormSend' no se encuentra.
I am running into a lot of difficulties trying to get this form to work. I'm used to other forms being a bit more descriptive like:
<form role="form"
data-request="{{contact}}::onContactSent"
data-request-update="'{{contact}}::confirm': '.confirm-container'"
data-request-success="$('.form-groups').slideUp(1000)">
</form>
and the steps being more clear into "how" you are supposed to configure the form. I want to use all of my own custom fields (I have the form actually created on my site right now http://cyberbytes.co/support but can't figure out).
I have read through the docs about 3-4 times now and this is the 4th or 5th contact plugin I have used and haven't had trouble with the other ones. They had the ability to just drag in the code snippet for the form though which made it very straightforward. I'm stuck right now and burning a lot of time trying to figure out how to get this working :/
Not sure if you have like a live example anywhere that we can inspect the code to see exactly what HTML you have written out in order for your plugin to grab the data because that would help a LOT.
Thanks! (:
For example here: janvince.smallcontactform::mail.notification
{{ key }}
must be a label.
I wanted to update the plugin (v1.2.4) and I got the following error message:
"SQLSTATE[42000]: Syntax error or access violation: 1170 BLOB/TEXT column 'remote_ip' used in key specification without a key length (SQL: alter table janvince_smallcontactform_messages
add index janvince_smallcontactform_messages_remote_ip_index
(remote_ip
))" on line 666 of /var/www/tttweb/data/www/examplewebsite.com/vendor/laravel/framework/src/Illuminate/Database/Connection.php
Thanks for the great plugin!!
how to add dropdown field with option values in field type from backend which shows on frontend and submit values
Hi!
First of all, thank you for your fantastic plugin.
I would like to use your plugin inside a Static Page. My initial idea was to add it as a partial, but it dosen't work with October CMS AJAX limitations.
Do you have any idea how I could use your plugin?
Thanks!
Hi,
I have app on PHP 7.2.2.
In plugins/janvince/smallcontactform/models/Message.php
file is:
public function sendNotificationEmail($postData, $componentProperties = [], $formAlias, $formDescription){
...
if(!empty($componentProperties['disable_notifications'])) {
return;
}
I added Log::error('SMALL CONTACT FORM ERROR: ' . var_export($componentProperties, true));
to check what is in $componentProperties
and this is result:
[2018-06-04 08:55:39] production.ERROR: SMALL CONTACT FORM ERROR: array (
'form_description' => NULL,
'disable_notifications' => 'false',
)
As we know 'false' !== false
and that's why this condition is always true.
Fix it please.
All best.
It would be great, if I could give a redirect url, after the form send the email (or stored the data).
In Settings > Small plugins > Contact form page I got the following error message:
Invalid argument supplied for foreach()
/var/www/tttweb/data/www/examplewebsite.com/plugins/janvince/smallcontactform/models/Settings.php line 164
Plugin: 1.3.0
October: 419
PHP: 5.6.30
Hello, thanks for your great work.
Is there any way to customize my HTML. For example, I need to put name and email side by side, I can add css class to name input and its wrapper, but what if I need to put it and email in separate wrapper other than the other fields?
The plugin will currently log an error on submission if reCAPTCHA is enabled because it thinks that it is an undefined field in the form submission dataset. Exact error message is SMALL CONTACT FORM WARNING: Found a non-defined field in sent data! Field name: g-recaptcha-response and value:
I'm sorry if this is sort of broad spectrum issue as 'anything can be wrong', but maybe I missed something obvious...
After posting the form, I get 200 OK response for the POST route with proper headers, however, no messages are written in the database, hence none returned in the dashboard.
More data:
AJAX handler 'contactForm::onFormSend' was not found.
I installed the plugin directly from the CMS backend and added this minimal configuration. There is a chance Mail Configuration is not working properly, but I don't think this should interfere with storing messages.
Hi, how do I send a message to the mail?
I override form's property in Twig component tag:
{% component 'myForm' form_description = 'My other description' %}
But after an error when filling out the form, form_description is lost
Hi,
is there any option how to send in email additional information about page?
The form is placed on all articles page and i need send with the form current page title and page URL.
I tried use:
{% component 'myForm' form_description' = 'page title and url' %}
but i can not add variable form_description to the mail template - only on backend list.
any idea how to add information about the page and article to the email?
thanks
Vaclav
Had problems with
AJAX handler 'contactForm::onFormSend' was not found.
because the component was placed in a partial. I created a placeholder in the layout with the contactForm
component and called the placeholder in the partial.
Form works and sends data in the partial, but does not in a page. My question is if this is the correct way to place the component? Is there any security issue because of the placement method?
Hey, I was wondering if you could add the possibility to have labels AND placeholders?
Now I apologize in advance that my English is not good. I use your plugin for the first time and it is very good.
I know (maybe I got it wrong?) that the default inputs are below each other. As here's an example:
.........
.........
<div class="form-group"><input id="contactForm-name" name="name" class="form-control" placeholder="Nimi *" type="text" required=""></div>
<div class="form-group"><input id="contactForm-email" name="email" class="form-control" placeholder="E-post *" type="email"></div>
<div class="form-group"><input id="contactForm-phone" name="phone" class="form-control" placeholder="Telefon" type="text"></div>
<div class="form-group"><textarea id="contactForm-message" name="message" class="form-control" placeholder="Sinu sõnum *" rows="5" required=""></textarea></div>
.........
.........
I need to place the inputs to in the group "<div class ="col-md-6">
" the desired place like here:
.........
.........
<div class="col-md-6">
<div class="form-group"><input id="contactForm-name" name="name" class="form-control" placeholder="Nimi *" type="text" required=""></div>
<div class="form-group"><input id="contactForm-email" name="email" class="form-control" placeholder="E-post *" type="email"></div>
<div class="form-group"><input id="contactForm-phone" name="phone" class="form-control" placeholder="Telefon" type="text"></div>
</div>
<div class="col-md-6">
<div class="form-group"><textarea id="contactForm-message" name="message" class="form-control" placeholder="Sinu sõnum *" rows="5" required=""></textarea></div>
</div>
.........
.........
My simple question only inputs placement opportunities. I have a bit of experience and knowledge. But how have you solved this issue quickly? What are your best practices?
I am very grateful for any thoughts and suggestions!
Best regards
kukrik
Hi there,
On our site and many clients, we usually have at least 2 separate contact forms. 1 is usually just a general "contact us - sales" form and the other is generally a "support" form.
We need the inquiries sent from the "sales" form to be sent to [email protected] while the support goes to [email protected] (so that it can be properly filed and a ticket can be created in a help desk).
The information collected here is also slightly different for each form. Different information requested for Support form versus a Sales request form.
Here is a great implementation of a different contact form that has since been abandoned (but one of the top selling contact forms on OctoberCMS.)
Is there a way to change the redirect page depending on the slug, for example? Thanks!
I set "Enable Ajax" at plugin settings. And my page reloads while sending form.
$validator->failed()
will only be empty when no validation is used. When a form is valid this is returned:
Array ( [Your Name] => Array ( [Required] => Array ( ) ) [Your Email] => Array ( [Required] => Array ( ) ) )
In order to fix this you need to do something like foreach array[key]->Required if empty.
Or maybe I'm missing something?
Hi, this is a great plugin. I've used it on another site. But... for some reason I'm now getting an 'Undefined index: name' error on a new installation.
Plugin installs fine, go to Settings, add new fields & save. As soon as I refresh it throws the error and I can no longer access the Settings. Need to uninstall & reinstall, only for the same thing to happen each time.
Plugin v.1.24.0
OctoberCMS build 447
Error:
Undefined index: name
/home/vagrant/code/villacrowd/plugins/janvince/smallcontactform/models/Settings.php line 174
Any ideas?
I would like to add the contact into into subscriber list form the plugin news and letter.
do you have anything example?
Please add reCaptcha support to the Antispam tab.
I have two problem:
Hi Jan, thanks for a great plugin.
I have 2 issues when using it with ajax:
When I send an empty form and validation errors appear along with the danger message on top of the form. And then if I fill in the fields correctly, the success message appears on top of the form, but the error message doesn't disappear.
If I submit a form and validation errors appear (using ajax) and then reload the page, the error message on top of the form stays and I have to reload the page once again to make it disappear.
Thanks,
Andriy
When I try to add reCaptcha, it is not being added to the form. Additionally the scripts which should remove the passive antispam field are not being added.
This seems to indicate something is fundamentally wrong with the plugin: it doesn't read all of its settings. In \JanVince\SmallContactForm\Components\SmallContactForm::onRun() the statement $this->formDescription = $this->property('form_description'); evaluates to null, even though I've entered a form description for the form component in the page.
Hi! I use two forms. One should be closed after sending the message. and the other is not. Is it possible to manually transfer the value of the "Hide form after successful send" parameter to the component?
Hello, as the title suggests, I want to add HTML classes to the form elements. How do I do that?
Thanks for your response.
dear jan , thank you for your plugin. it is great! I have a question that can this plugin used in partials? it works well in pages htm, but it seems doesn't work well in partials htm. can you help me ?
Hi! How make multiple forms in your plugin?
Any chance of this happening? Custom validation has changed in Bootstrap 4 so it doesn't work here, no matter what I try I always get browser default messages.
Best regards,
Boris
Hi there, thanks for the great plugin - it's very useful :)
Is it possible to run some code upon a successful submission? For example, when someone submits the form and their details are added I'd also like to subscribe them to a Mailchimp list. Are there any events or 'hooks' that I can use for this purpose?
Kind regards,
Phil
how to customize the plugin for adding new validation rules and messages.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.