am-impact / amforms Goto Github PK
View Code? Open in Web Editor NEWForms plugin for Craft
License: Other
Forms plugin for Craft
License: Other
When using multiple forms with same fields on one page, you get duplicated id's. This prevents the datepicker js from working properly for example.
How would one select a "Thank you" page from another locale?
When I click 'Select a page' in the right column and browse the entries there's no way to select another locale.
Is this something on the roadmap or am I missing some (general) settings?
How do I get to the Settings to enable reCAPTCHA?
Going to Plugins lists the plugin as active, but the plugin does not have a clickable link to go to a settings page?
When submitting a form using amforms it sometimes reloads with the parameter ?submitted=0 instead of ?submitted=myform
This results in a not submitted form, and it can be difficult for users to understand if the form was submitted or not.
Great plugin!!
One small point. How can I customize the body of the automatic notification email?
Thanks!
Hi, could you please add a license to the plugin? Would be good to know if you plan to keep it open, or convert it to a commercial plugin at some point.
When I try to submit a form with an asset field attached to it, I get the following error:
array_merge(): Argument #1 is not an array
The field is limited to a single asset upload, and is a required field, though I have noted that it has a separate issue if I make it not required:
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
bluechiptek.
craft_relations, CONSTRAINT
craft_relations_targetId_fk FOREIGN KEY (
targetId) REFERENCES
craft_elements (
id) ON DELETE CASCADE). The SQL statement executed was: INSERT INTO
craft_relations (
fieldId,
sourceId,
sourceLocale,
targetId,
sortOrder,
dateCreated,
dateUpdated,
uid) VALUES (:row0_col0, :row0_col1, NULL, :row0_col3, :row0_col4, :row0_col5, :row0_col6, :row0_col7). Bound with :row0_col0='197', :row0_col1='1031', :row0_col3='Web Architecture - 11 March 2015 - BlueChipTek.pdf', :row0_col4=1, :row0_col5='2016-04-01 18:47:48', :row0_col6='2016-04-01 18:47:48', :row0_col7='d6576550-7caa-48e6-a13a-12c1f2a94acc'
If I set the field to not be required and just ignore that field, the form submits as expected.
When I use a custom checkbox field it only saves the value of the last selected checkbox. Can you provide an example of a valid checkbox markup?
I have a weird issue with your otherwise excellent plugin.
I'm using a custom form (as specified in the documentation) that has certain fields that are required. Upon the first submit with missing data for required fields the form returns to be shown and the errors are shown as well. But on the second attempt, without filling in the required fields the form gets submitted and show the specified redirect page.
Since the upgrade to craft 2.5 (using the latest AM Forms release 1.2.10, but also had it with 1.2.8) uploading a file using a A&M Forms does not work anymore. I'm not 100% sure it is actually a A&M Forms issue, could be a general Craft 2.5 issue. This is the exact error:
PHP warning
array_merge(): Argument #1 is not an array
/Applications/MAMP/htdocs/denoordboom.local/craft/app/fieldtypes/AssetsFieldType.php(266)
and this is the code that fails:
254 }
255
256 foreach ($uploadedFiles as $file)
257 {
258 $tempPath = AssetsHelper::getTempFilePath($file['filename']);
259 move_uploaded_file($file['location'], $tempPath);
260 $response = craft()->assets->insertFileByLocalPath($tempPath, $file['filename'], $targetFolderId);
261 $fileIds[] = $response->getDataItem('fileId');
262 IOHelper::deleteFile($tempPath, true);
263 }
264 }
265
266 $fileIds = array_merge($value, $fileIds);
267
268 // Make it look like the actual POST data contained these file IDs as well,
269 // so they make it into entry draft/version data
270 $this->element->setRawPostContent($this->model->handle, $fileIds);
271
272 return $fileIds;
273 }
274
275 /**
276 * @inheritDoc IFieldType::onAfterElementSave()
277 *
278 * @return null
How do I get the dropdown field I created to show in a form?
Is it possible to dynamically change the 'Email To' field within the HTML template. I need to change the email address depending on the location set in the users account. Is this possible to be set in some sort of parameter or hidden input?
I tried to change the label for the Name field to Your Name and it wouldn't save, because "name" is a reserved word in Craft. You may want to change that default field name so the other aspects of that field can be changed.
I'm trying to do some custom form HTML, and would like to refer to the default templates you're using when invoking {{ craft.amForms.displayForm('handle') }} ... but I can't find where in your plugin the default templates are?
(The example for a basic plaintext field is fine, but I can't work out what I'm supposed to do for checkboxes - thought I could refer to what you're doing yourself).
Thanks,
Matt
Couple of bugs with the dashboard widget...
How do I make a field required so if the user does not fill it out, I can tap into the errors display?
Hey-
Trying to get your plugin to install but Craft isn't recognizing that a plugin is even available to install from settings. I've uploaded the master file to plugins. I haven't an issue installing the Craft Contact Form or others, just this one.
Am I supposed to be stripping files from amforms-master before uploading?
I have copied the various templates from plugins templates _display folder: form.twig, tab.twig and field.twig
to /craft/templates/_amforms/
When I create a form and add my template links - same as default: _amforms/field
When the field template is set to that and I try to display the form on the front end I get the error:
Template Error
Unable to find the template “_components/fieldtypes/PlainText/input”.
Have I done something wrong?
More a request than an issue. I'd like the option to export submissions using commas instead of semicolons, or allow users a choice, for easier use with applications.
@bvangennep I'm trying to output an amform in a template that has been selected from a Form field. From the docs it says:
{{ craft.amForms.displayForm('formHandle') }}
My matrix fieldname is called myFormField:
so:
{{ craft.amForms.displayForm('{{block.myFormField}}') }}
But it doesn't look like craft is parsing {{block.myFormField}}:
No form exists with the handle “{{block.myFormField}}”.
Any thoughts?
I haven't been able to install latest version because of error.
Had to install first release and then update.
Two 'issues' using your excellent form:
• I'm missing the frontend code to display entries. Is that possible? Or no web page entries output?
• Also examples of the custom templates to adapt the html and css I would be useful (form.html, field.html etc)
Hey!
Very nice work with the plugin. Thanks.
When validating a page with a form, I get
Element style not allowed as child of element form in this context.
Code sample:
<form method="post" action="" class="form contact-form" accept-charset="UTF-8">
<input type="hidden" name="action" value="amForms/submissions/saveSubmission">
<input type="hidden" name="handle" value="contactForm">
<div class="yourssince1615__wrapper">
<label>Leave this field blank</label>
<input type="text" id="yourssince1615" name="yourssince1615" value="">
</div>
<style>.yourssince1615__wrapper{ display: none; }</style>
<input type="hidden" id="__UATIME" name="__UATIME" value="1460473164" />
<input type="hidden" id="__UAHOME" name="__UAHOME" value="043a1251a7f624ae3e2e4a0a30676fec" />
<input type="hidden" id="__UAHASH" name="__UAHASH" value="87053d2675cf68a0f94a335ed8c0f900"/>
....
</form>
Is this supported?
How can I submit a file in a form and have it appear as an asset in the form submission entry?
Thanks!
It appears as though there is no error reporting for the captcha. If there isn't can this please be added?
Hi.
I have a simple form containing the standard telephoneNumber
field.
On each send there is the message: "Craft\AmForms_FormModel doesn't have a scope telephone number"
If I add telephoneNumber
as a mandatory field. The whole form will validate without any entries in any field. Superstrange.
I removed telephoneNumber
altogether and now it's working fine.
Liking the addon, and use others of yours. However, as with most form addons they all just miss a slight feature that would make them work better if this unique scenario!
In this case, not HTML5 browser, javascript disabled, we rely on server side validation. As we all should for security anyway.
However, when you redirect back to the form to display the errors on the form - if the form is half way down the page, the users will be more than confused. Is there anyway we can specify the redirect URL in case of error. i.e. www.mysite.com/form#halfwaydown
Thanks,. N
I noticed that the reply address of the admin notification mail is standard set in the form notification tab.
This results in the admin (my client) answering to his/her own address. The address should be the submitters address (toEmail?)
For the submitters' copy the reply address should be the set reply address in the notification tab or the (fromEmail).
I see that there is an advanced 'entries' field. It would be great if there was also an advanced 'categories' field.
In the meantime, I am trying to set up a dynamic drop-down list based on category titles/slugs — what is the best way to accomplish this? Perhaps create a dummy drop down field (with no options defined), and then build my own options list on the front-end using craft data? I'll try that, but if anyone has a better solution please let me know. Thanks.
[Update: the dummy dropdown solution above doesn't work. Although it submits the data correctly it does not show up in the CMS when reviewing the submitted form data, because the list is obviously empty. Using a dummy text field seems to work however.]
Btw... the am-forms plugin is great. Huge thank you!
Is there a way to have a select field in a form that depending on which option is selected changes the
email that receives the email notification?
Thanks.
My form handle is newsletterForm, I am using the below code but getting the error:
Craft\AmForms_FormModel and its behaviors do not have a method or closure named "newsletterForm".
{% set form = craft.amForms.getForm('newsletterForm') %}
<form method="post" action="" accept-charset="UTF-8" id="form-newsletter">
{{ getCsrfInput() }}
{# This should always be here! #}
<input type="hidden" name="action" value="amForms/submissions/saveSubmission">
{# Insert your form's handle. #}
<input type="hidden" name="handle" value="{{ form.newsletterForm }}">
{# This will namespace your inputs (for IDs and such), but it's not required though #}
<input type="hidden" name="namespace" value="{{ form.getNamespace() }}">
{# Place the HTML of your fields here #}
{{ form.displayField('fullName') }}
{{ form.displayField('emailAddress') }}
<input type="submit" value="Submit">
</form>
I'm developing a site locally and had created templates for both field and form. I set them in the form settings and everything worked. However, when I downloaded my changes (via Git) to my server, the custom templates aren't being called.
I've reinstalled the plugin, deleted and recreated the form, and checked my DB to make sure the value was being saved for the template path, and cleared caches. I've also checked the files and renamed them. Everything looks good on the back end, but when I load the form, it just loads the default templates and throws no errors.
I also tried to just put a random string for the template path and that didn't throw any errors. Any ideas?
When I use a form on a page that has a twig include such as:
{% include "_includes/our_clients_say" %}
I get the error: Unable to find the template “_includes/our_clients_say”. The path is correct and works fine on all pages that do not use Forms tag. Any idea why?
Would it be possible to override field settings like "autocomplete" when using "displayForm"?
Managing these setting via the CP for each field would be amazing, but even being able to pass a config object to "displayForm" and "displayField" would be great.
I see the gear icon where I can choose what fields to display in the column view, but only a set amount of fields are available. I would like to be able to add any custom field I created eg, email, phone, or message.
Currently available are only default fields:
Title
Form name
Date created
Date updated
Notes
I have a feedback form that I'm embedding on every page inside of a structure (it's a Support-style section, so I'm using the form to gather feedback for each article). Is there a way to change the submission Title Format to display the title of the entry the form is embedded on instead of the default {dateCreated|date('D, d M Y H:i:s')}
? I've tried using {entry.title}
but it gives me an error saying the variable entry
doesn't exist. I feel like maybe I'm missing something obvious with this?
Great plugin btw!
The Email field type doesn't offer a placeholder field, and it should.
Is it possible to seperate notifications — i.e. one receipt notification to the form submitter, and one summary notification to the site admin?
While it is possible to override the html for the form, field rows and tabs, it doesn't seem possible to use custom html for the different for element types. Or am I missing something?
I want to use different class names on the elements, is there another way to do this? I can create a whole custom form just fine, but when you have several forms using the same css it becomes a tedious task to create all the forms.
Thanks in advance.
Hi there,
this is a great looking plugin, but I can't see a way to declare a field as being required; is this possible? Similarly, is there no way to validate types of input such as 'email'?
Thanks,
Matt
Granted, this is a brand new feature of Craft 2.5... perhaps you're already working on it.
Some official icons would be great:
Loving this plugin, btw! I recently switched over from P&T Contact Forms, and never realized just how much great stuff I was missing. :)
Thanks, and keep up the great work!
I am getting a ton of these when using A&M Forms now with Craft 2.6.2779. Looks like a change in Craft was made and the Forms plugin needs to be updated.
PathService::setTemplatesPath() has been deprecated. Use TemplatesService::setTemplatesPath() or TemplatesService::setTemplateMode() instead.
Is there a way to have custom markup for success message?
As a side note, do you have better documentation on doing errors. I tried to follow the readme, and I get nothing on the errors side.
I am currenlty testing this on Craft Personal 2.5.2755 16/12/2015
And from Firefox 43
The drag and drop interface for the form field creation fails. It does not drop, and it no longger draggable for other fields.
Thanks, N
Is this a feature that currently exists & i'm just not seeing it, or is it something that's planned for the future?
Hi,
Is there any documentation on how to produce a custom notification containing data from the posted form?
Thanks
How do I set up notification emails to be sent when a form is submitted?
I was looking in general > config there was an option to use mandril but it requires the
"a&m mailer in order to work"
Thanks!
I put the a form field named formular in some entries and like to show the right form in my layout.
But neither {{ entry.formular }} nor {{ craft.amForms.displayForm(entry.formular) }} is working.
What is the right syntax?
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.