enigmadigital / formerly Goto Github PK
View Code? Open in Web Editor NEWPlugin to allow users to create custom forms within Craft CMS
License: MIT License
Plugin to allow users to create custom forms within Craft CMS
License: MIT License
Is it possible to include a config setting to allow for checkbox values to be exported as individual columns with the label as the column heading and the row value (yes/no/1/0) as the selected value?
Right now everything is exporting within one cell so it's impossible to import information into 3rd part applications like mailchimp or otherwise.
In my e-mail template, I would like (for instance) this to be possible:
{assetFieldHandle.first().url}
It's not possible now, because of this line (SubmissionService, line 240):
if ($q->handle == $formHandle . '_' . $a) {
I've changed it locally to this:
if (strstr($formHandle . '_' . $a, $q->handle)) {
That works.
While not critical it would be great to see email notifications be sent out in a "pretty" format. Wufoo for example has really pretty HTML.
I was going to make the edit myself but it looks like I can't because of how the submission information is being complied before it's sent. It looks as if the formatting happens before the body is even called
Would it be possible to add something like this in?
Could make for a useful Dashboard widget for e.g. sales enquiries.
I undersatnd this has probably be done for effiency - but useless when i have 900+ to export and no way to modify Formerly to handle it!
Hi
Looking to add my own custom field-type.
Can get appearing in back-end but once save it is not saved in the database record.
Any thoughts on debugging? Obviously not very helpful without some code to go on.
Cheers
Cole
https://github.com/xodigital/Formerly#viewing-submissions
Am i being dopey - i cannot get this to work in any shape or form on latest version?
If Craft's config-file has an array of siteUrls, for localization purposes, line 259 of the SubscriptionService throws an error on submission:
$result = str_replace("{siteUrl}", craft()->config->get("siteUrl"), $result);
It would be useful to be able to specify the value and label separately.
For example, this functionality could be used to direct an enquiry to different email addresses based on the value of a dropdown.
Also, thanks for making a great plugin.
Hi there,
We need to explain customers that they need to click Formerly everytime to load contact emails and stuff. Can you please rename it to FORMS or something that is logical.
Cust: "So...where ccan I find the forms?"
Us: "Have you tried formerly?"
Cust: "Formally what?"
Us: "No have you tried Formerly"
Cust: "Sorry, but we havent tried anything formerly"
Us: "No please press the button called formerly"
Cust: "Called what formerly? Button?"
Us: "Nevermind, we'll send somebody who will give an exhausting training"
Hi - Small fix otherwise submissions are broken -
line 203 - formerly/services/Formerly_SubmissionsService.php
if (!empty($email->body && $sendEmail))
Should be -
if (!empty($email->body) && $sendEmail)
Hello.
There is a problem with Craft 2.3.2620 running on DigitalOcean via Laravel Forge. Form creation is unsuccessful with an error "Couldn't save form". Plugin directory is writable. What could be the issue here, any suggestions?
It would be great if this plugin provided a file upload field to attach one or more documents or images to the form submission. Are there any plans to implement this?
1.3.3
I have created a simple form. Added the config for honeypot, the field is displaying on front end in form (as expected till i hide it).
I submitted twice, once with it empty, once with content in the honey pot field.
Both went into DB and both arrived as emails?
I'll dig into it - but letting you know at this point. N
It would be great if there was a general text / HTML field option for the form builder part.
For example in my current simple form i just needed to add a title to a section of the form. A simple general text field would do this nicely.
But i think this plugin is out of dev / or maybe even dead now, so not sure this is somehting that needs to be forked and continued elsewhere?
Struggling to manage date fields in front-end.
These are either not validating (throwing a 'date cannot be blank' error) or submitting as successful but the relevant values are not being saved in Craft.
Is it possible to include a name in the from field of submission emails?
I tried {name}<{email}>
and {name} <{email}>
(with and without a space before the gt) with no success. Of course I have a name field in the form.
p.s. โ thank you for making this and offering it to others.
Is shaping up to be the neatest forms solution in my view ( I have tried a few). Only snag i found is if you have enableCsrfProtection in the config you cant edit forms in admin. Should be an easy fix.
Cheers for adding honeypot.
Hi,
Just wanted to post this as a solution for others with same issue.
If you get an 404 after a form is submitted, check if the url after submission contains index.php?p= or not.
With my setup, it was even though I had my .htaccess configured not to use it.
On another site I had exactly the same config and there it was working without an issue, so I compared every used file, but couldn't find any mismathc.
So while searching the Issues here and not getting my answer I've found another hint in Craft CMS forums with a similar behavior on a {{craft.request.url()}}.
In /craft/config/general.php, define next in the array: 'omitScriptNameInUrls' => true,
That should solve it then.
Cheers,
Eric
Formerly currently does nothing to prevent bots submitting a form. We should implement some kind of honeypot field as a base measure.
Lines 367 to 377 on file Formerly_FormsService.php
$folderid and $allowedkinds are set incorrectly, using square brackets.
need updating to:
if (craft()->config->exists(Formerly_ConfigSettings::SettingsGroupName))
{
if (array_key_exists(Formerly_ConfigSettings::UploadAssetFolderId, craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
{
$folderId = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName, Formerly_ConfigSettings::UploadAssetFolderId);
}
if (array_key_exists(Formerly_ConfigSettings::AllowedKinds, craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
{
$allowedKinds = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName, Formerly_ConfigSettings::AllowedKinds);
}
}
Hey hello how are you?
So what is the deal with the Assets field anyway?
Can somebody please explain how or what is happening and why.
case Formerly_QuestionType::Assets:
$folderId = 1;
$allowedKinds = array("excel","image","pdf","text","word");
if (craft()->config->exists(Formerly_ConfigSettings::SettingsGroupName))
{
if (array_key_exists(Formerly_ConfigSettings::UploadAssetFolderId, craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
{
$folderId = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)[Formerly_ConfigSettings::UploadAssetFolderId];
}
if (array_key_exists(Formerly_ConfigSettings::AllowedKinds, craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)))
{
$allowedKinds = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)[Formerly_ConfigSettings::AllowedKinds];
}
}
$field->type = 'Assets';
$field->settings = array(
'useSingleFolder' => '1',
'sources' => array('folder:' . $folderId),
'defaultUploadLocationSource' => '1',
'defaultUploadLocationSubpath' => '',
'singleUploadLocationSource' => $folderId,
'singleUploadLocationSubpath' => '',
'restrictFiles' => '1',
'allowedKinds' => $allowedKinds,
'limit' => '1'
);
break;
I keep getting "An unknown error occurred." when trying to view submissions in the admin.
the craft log shows this:
[error] [php] htmlspecialchars() expects parameter 1 to be string, object given (/Users/birch/Projects/eReport/craft/app/framework/web/helpers/CHtml.php:103)
Stack trace:
#0 /Users/birch/Projects/eReport/craft/plugins/formerly/elementtypes/Formerly_SubmissionElementType.php(74): Craft\Formerly_SubmissionElementType->getTableAttributeHtml()
...
There is an issue when trying to save fields with long names.
After some investigation the handle for each field is saved by concatenating the form handle with a generated handle for the form label/name.
This is easily resolved in the generateHandle helper() if we pass the form handle as a second variable and do a length test, eg see example Gist at https://gist.github.com/cole007/10c37d3e93a0c2984249
Is there any easy way to prevent spam with Formerly?
Title says it all really, am not able to display errors because of it
A tab named 'Formerly' isn't as clear to clients.
Hi folks,
Can somebody tell me where I can find out how the Asset upload field.
Very nice plugin! Are you planning to make the form fields translatable? This plugin doesn't seem to support translation so I created 2 separate contact forms: one English and the other French. This is working well, but it would be nice to have true i18n integration.
Steps to reproduce:
The reloaded entry will have wrong item option selected (the first option is displayed as "selected" instead of the second option that we selected).
Im trying to get the file uploading with assets working and its not. it doesnt give me error but silently submits the form without adding the file to assets. Tried multiple files and their working from the assets pane in craft.
the folderId im setting in the config and its the sourceId i get from the url and its the same in the 'id' field in the database table 'craft_assetfolders'
any breaking changes or is it just me?
Not sure if this is Craft 2.5 related but Formerly currently gives a 500 error when in production vs. localhost (which is working). Same version, same db and everything.
500 error happens on the dashboard and when trying to access /admin/formerly
Really not a critical bug or anything like that, especially as you are using the HTML5 validation as default...
But if you do not rely on HTML5 validation (as it is client side) then when you submit the form and get errors, you get the bullet point list of errors back (note you missed the UL tags on these!
The issue is that the errors that are returned in this list are in Alphabetical order - not the order of the fields in the form. This is really confusing for the user - but I know it will not make anything explode! It is truly just a usability thing!
As a side request - the emails sent out. I see they take HTML, but seem to auto BR the contents. meaning to put your own HTML in there you have to trim all whitespace from your HTML to make it work. Again, just a usability thing. Maybe a check box to all a switch between plain text and HTML email? Or the ability to select a template to process?
But thanks for all the effort plugin works neatly, and meets my needs, N
Allow a Craft user to export the data collected via a formerly form into a CSV.
Hi there,
I'd like to help getting making this package multilingual. Could you give me guidance on how to accomplice this? It's not my code and I'm inexperienced when it comes to Craft plugin development.
Best regards.
We've got a checkbox with a single option/value ("Sign up for our newsletter") but the information is not exporting correctly.
Here's a screenshot of the form: https://www.dropbox.com/s/obt5vltchwqc3kt/Screenshot%202015-08-21%2009.21.31.png?dl=0
Here is a screenshot of the info displaying in the admin:
https://www.dropbox.com/s/142038ij2g5oi2p/Screenshot%202015-08-21%2009.24.27.png?dl=0
Here's a screenshot of the missing info: https://www.dropbox.com/s/63scva2q1bsxn5g/Screenshot%202015-08-21%2009.23.37.png?dl=0
Hello,
I'm getting a php warning on submission when a file has been uploaded.
array_merge(): Argument #1 is not an array
AssetsFieldType.php(266)
266 $fileIds = array_merge($value, $fileIds);
Object of class Craft\MultiOptionsFieldData could not be converted to string
We are having an issue with the download link function (downloadLink) when viewing a submission.
The file is present in the correct path according to the 'assetFolderId', but upon clicking the link from the submissions view a corrupt/blank file is downloaded.
I recently installed the Formerly form plugin. The form works great and submissions are being stored in Craft. Unfortunately, when users hit submit I get this error:
Internal Server Error Craft\Formerly_SubmissionModel and its behaviors do not have a method or closure named "test_email".
Has anyone seen this issue? The "test" is my handle for the form. The documentation on the plugin is fairly limited, so I'm having trouble tracking down the issue. Any help would be greatly appreciated.
Jeremy
Deleting one at a time is great and all - but when we have 900+ entries to go through and delete... its a bit tedious!
Is there a bulk select i am missing or?
Thanks, N
We've got a large custom form which has problems saving forms with more than eleven fields.
Any idea why this might be a problem?
Just installed on - Craft Pro 2.3.2643
Captures submissions and works great in admin, but the template throws the below error on submission
Craft\Formerly_SubmissionModel and its behaviours do not have a method or closure named "contactForm_name".
Anything i can do? Be good to stick with this plugin as it has the neatest design
Just a heads up, PHP 5.3 doesn't support the function dereferencing done in a few places:
I ended up patching this myself in the relevant spots, eg:
$writeEmailToFilePath = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName)[Formerly_ConfigSettings::writeEmailBodyToFilePath];
should be:
$writeEmailToFilePathSettings = craft()->config->get(Formerly_ConfigSettings::SettingsGroupName);
$writeEmailToFilePath = $writeEmailToFilePathSettings[Formerly_ConfigSettings::writeEmailBodyToFilePath];
Was running a newer PHP version locally so I didn't catch it until I pushed to production. Oops. A heads-up in the README would have been helpful! ;)
Even with the honeypot and latest version installed we're getting tons of spam. ~30+ emails a day in some cases.
Is there a chance they are submitting without hitting the honeypot?
Does the plugin allow for CSRF protection? http://buildwithcraft.com/help/csrf-protection
There is plenty of room for filters etc on the export tab. Not 100% what would actually be useful here though.
I know that file uploads are in your todo list... Do you have an ETA for that? We have a client that has an immediate need for this.
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.