Giter VIP home page Giter VIP logo

formie's Issues

Neither html nor markdown supported in success message

Description

Form displays unconverted success text

Steps to reproduce

  1. Select form option "Action on Submit" = "Display a message"
  2. Add <strong>Thank</strong> you for your **message**! as form Submission Message
  3. Submit form in FE

Expected

Text is formatted bold

Actual

Text is displayed as "source code"

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: Yes

Additional info

  • Plugin version: 1.0.4
  • Craft version:

Can't save new form (Craft 3.5RC1.1)

Description

I'm trying to create a new form with a handful of fields, and when I click "Save" I get an "Unable to Save Form" error message. Here's the relevant stacktrace from my logs:


Next yii\db\IntegrityException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`hcps_dev`.`formie_rows`, CONSTRAINT `formie_rows_fieldLayoutFieldId_fk` FOREIGN KEY (`fieldLayoutFieldId`) REFERENCES `fieldlayoutfields` (`id`) ON DELETE CASCADE)
The SQL being executed was: INSERT INTO `formie_rows` (`row`, `fieldLayoutId`, `fieldLayoutFieldId`, `dateCreated`, `dateUpdated`, `uid`) VALUES (0, 30, 0, '2020-07-23 17:17:44', '2020-07-23 17:17:44', 'f780fe76-e871-4cfc-9a27-8909f7df0d3b') in /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/db/Schema.php:677
Stack trace:
#0 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/db/Command.php(1298): yii\db\Schema->convertException()
#1 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/db/Command.php(1093): yii\db\Command->internalExecute()
#2 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/db/Schema.php(432): yii\db\Command->execute()
#3 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/db/ActiveRecord.php(600): yii\db\Schema->insert()
#4 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/db/ActiveRecord.php(566): yii\db\ActiveRecord->insertInternal()
#5 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/db/BaseActiveRecord.php(678): yii\db\ActiveRecord->insert()
#6 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/verbb/formie/src/services/Fields.php(857): yii\db\BaseActiveRecord->save()
#7 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/verbb/formie/src/services/Fields.php(730): verbb\formie\services\Fields->saveRows()
#8 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/verbb/formie/src/Formie.php(187): verbb\formie\services\Fields->onSaveFieldLayout()
#9 [internal function]: verbb\formie\Formie->verbb\formie\{closure}()
#10 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/base/Event.php(312): call_user_func()
#11 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger()
#12 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/craftcms/cms/src/services/Fields.php(1425): yii\base\Component->trigger()
#13 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/verbb/formie/src/services/Forms.php(163): craft\services\Fields->saveLayout()
#14 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/verbb/formie/src/controllers/FormsController.php(122): verbb\formie\services\Forms->saveForm()
#15 [internal function]: verbb\formie\controllers\FormsController->actionSave()
#16 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()
#17 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams()
#18 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/craftcms/cms/src/web/Controller.php(181): yii\base\Controller->runAction()
#19 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction()
#20 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/craftcms/cms/src/web/Application.php(295): yii\base\Module->runAction()
#21 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/craftcms/cms/src/web/Application.php(597): craft\web\Application->runAction()
#22 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/craftcms/cms/src/web/Application.php(274): craft\web\Application->_processActionRequest()
#23 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest()
#24 /home/hcps/webapps/hcps-api-dev/releases/1595520373092/public/index.php(21): yii\base\Application->run()
#25 {main}
Additional Information:
Array
(
    [0] => 23000
    [1] => 1452
    [2] => Cannot add or update a child row: a foreign key constraint fails (`hcps_dev`.`formie_rows`, CONSTRAINT `formie_rows_fieldLayoutFieldId_fk` FOREIGN KEY (`fieldLayoutFieldId`) REFERENCES `fieldlayoutfields` (`id`) ON DELETE CASCADE)
)

Additional info

  • Plugin version: 1.0.4
  • Craft version: 3.5RC1.1

[FR] GraphQL support for form submissions

Is there a plan to add GraphQL support for form submissions? We’re working on a custom reporting interface that would need to pull information out of submissions and GraphQL would be a perfect fit. As a fallback I think we’ll need to create a custom ElementAPI interface?

Http response code 302 displays error msg

Description

Form submitted via ajax displays error message "Couldn’t save submission due to errors. 302: Found"

In src/web/assets/frontend/src/js/formie-form.js is says

if (xhr.status >= 200 && xhr.status < 300) {
...
}

shouldn't it be
< 400
instead as 30x codes do not necessarily indicate errors?

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: Yes

Additional info

  • Plugin version: 1.0.4
  • Craft version: 3.4.24

Forms templates - toggling off "Output CSS" doesn't toggle off "Output Theme"

Description

If I create a form template, by default both Output CSS and Output Theme are activated. If I disable Output CSS, then Output Theme gets hidden, but is still toggled. So the theme is still being outputted in the front-end.

It should be unticked when you untick Output CSS.

Steps to reproduce

Additional info

  • Plugin version: 1.0.1
  • Craft version: 3.4.28.1

Support for CRM integrations and developer guidance

Description

This plugin is gorgeous and I would love to use it! Unfortunately, we're unable to use it for literally any of our clients until we have support for common CRM integrations and API developer documentation. These are a few integrations we use regularly that are all supported by Freeform:

  • HubSpot
  • Mailchimp
  • Infusionsoft
  • Sharpspring
  • Zoho
  • Pardot / Salesforce

Additional info

  • Plugin version: 1.0.4

Error multi form validation

Description

If you create a multi page form and you have one required field in step 2 or step 3 there is an error on the first page.
If you remove the required in the second step everything is working.

Steps to reproduce

  1. Create multi page form
  2. Select in the Step 1 one field as required and select one field in step 2 as required and click next.
  3. Validation error "Couldn’t save submission due to errors."

Additional info

  • Plugin version: 1.0.3
  • Craft version: 3.4.29

Option 'Output JavaScript' = off still includes 'formie-base-form.js' in FE

Steps to reproduce

  1. Create custom template in CP
  2. Set option 'Settings' > 'Output JavaScript' = off
  3. Apply template to form
  4. Visit form in FE

Expected

formie-base-form.js and formie-form.js are no longer included in FE HTML

Actual

formie-base-form.js is still included in FE HTML

Use case

I would prefer to include these files as JS imports in my main JS file

import '../../vendor/verbb/formie/src/web/assets/frontend/dist/js/formie-base-form';
import '../../vendor/verbb/formie/src/web/assets/frontend/dist/js/formie-form';

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: Yes

Additional info

  • Plugin version: 1.0.7

Use globals in email template

Description

It would be nice if we can use globals in the email templates.
Currently if you use global fields in the email templates you got the error: undefined variable.

Additional info

  • Plugin version: 1.0.3
  • Craft version: 3.4.29

Setting unknown property error save form with error message

Description

If i want to save a new form with a custom error message i got the following error:
{"error":"Setting unknown property: verbb\\formie\\fields\\formfields\\Name::firstNameErrorMessage"}

Steps to reproduce

  1. Edit form
  2. Add customer error message for example (Stenciles -> Contact form)
  3. Save Form

Additional info

  • Plugin version: 1.0.2
  • Craft version: 3.4.28.1

Syncing from scratch with stencils fails

Description

Syncing a Formie install from scratch (i.e. no templates or statuses) fails due to stencils syncing before the statuses and templates had been created.

Create new form throws database exception

Description

Create new form, enter details, hit Save, db exception thrown

Steps to reproduce

  1. Create your form
  2. Enter details
  3. Save

Additional info

  • Plugin version: 1
  • Craft version: 3.4.27

Stacktrace:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fieldlayouttabs.id' in 'field list' in /var/www/cap.org/vendor/yiisoft/yii2/db/Command.php:1293
Stack trace:
#0 /var/www/cap.org/vendor/yiisoft/yii2/db/Command.php(1293): PDOStatement->execute()
#1 /var/www/cap.org/vendor/yiisoft/yii2/db/Command.php(1159): yii\db\Command->internalExecute('SELECT `fieldla...')
#2 /var/www/cap.org/vendor/yiisoft/yii2/db/Command.php(401): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /var/www/cap.org/vendor/yiisoft/yii2/db/Query.php(248): yii\db\Command->queryAll()
#4 /var/www/cap.org/vendor/craftcms/cms/src/db/Query.php(152): yii\db\Query->all(NULL)
#5 /var/www/cap.org/vendor/verbb/formie/src/services/Fields.php(655): craft\db\Query->all()
#6 /var/www/cap.org/vendor/verbb/formie/src/models/FieldLayout.php(58): verbb\formie\services\Fields->getLayoutPagesById(1035)
#7 /var/www/cap.org/vendor/verbb/formie/src/elements/Form.php(427): verbb\formie\models\FieldLayout->getPages()
#8 /var/www/cap.org/vendor/verbb/formie/src/controllers/FormsController.php(347): verbb\formie\elements\Form->getFormConfig()
#9 /var/www/cap.org/vendor/verbb/formie/src/controllers/FormsController.php(89): verbb\formie\controllers\FormsController->_prepareVariableArray(Array)
#10 [internal function]: verbb\formie\controllers\FormsController->actionEdit(25627, NULL, NULL)
#11 /var/www/cap.org/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /var/www/cap.org/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 /var/www/cap.org/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('edit', Array)
#14 /var/www/cap.org/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('edit', Array)
#15 /var/www/cap.org/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('formie/forms/ed...', Array)
#16 /var/www/cap.org/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('formie/forms/ed...', Array)
#17 /var/www/cap.org/vendor/craftcms/cms/src/web/Application.php(276): yii\web\Application->handleRequest(Object(craft\web\Request))
#18 /var/www/cap.org/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /var/www/cap.org/web/index.php(21): yii\base\Application->run()
#20 {main}

Next yii\db\Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fieldlayouttabs.id' in 'field list'
The SQL being executed was: SELECT fieldlayouttabs.id, fieldlayouttabs.layoutId, fieldlayouttabs.name, fieldlayouttabs.sortOrder, fieldlayouttabs.uid, ps.settings
FROM craft_fieldlayouttabs
LEFT JOIN craft_formie_pagesettings ps ON ps.fieldLayoutTabId = fieldlayouttabs.id
WHERE layoutId=1035
ORDER BY sortOrder in /var/www/cap.org/vendor/yiisoft/yii2/db/Schema.php:674
Stack trace:
#0 /var/www/cap.org/vendor/yiisoft/yii2/db/Command.php(1298): yii\db\Schema->convertException(Object(PDOException), 'SELECT fieldla...') #1 /var/www/cap.org/vendor/yiisoft/yii2/db/Command.php(1159): yii\db\Command->internalExecute('SELECT fieldla...')
#2 /var/www/cap.org/vendor/yiisoft/yii2/db/Command.php(401): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /var/www/cap.org/vendor/yiisoft/yii2/db/Query.php(248): yii\db\Command->queryAll()
#4 /var/www/cap.org/vendor/craftcms/cms/src/db/Query.php(152): yii\db\Query->all(NULL)
#5 /var/www/cap.org/vendor/verbb/formie/src/services/Fields.php(655): craft\db\Query->all()
#6 /var/www/cap.org/vendor/verbb/formie/src/models/FieldLayout.php(58): verbb\formie\services\Fields->getLayoutPagesById(1035)
#7 /var/www/cap.org/vendor/verbb/formie/src/elements/Form.php(427): verbb\formie\models\FieldLayout->getPages()
#8 /var/www/cap.org/vendor/verbb/formie/src/controllers/FormsController.php(347): verbb\formie\elements\Form->getFormConfig()
#9 /var/www/cap.org/vendor/verbb/formie/src/controllers/FormsController.php(89): verbb\formie\controllers\FormsController->_prepareVariableArray(Array)
#10 [internal function]: verbb\formie\controllers\FormsController->actionEdit(25627, NULL, NULL)
#11 /var/www/cap.org/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /var/www/cap.org/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#13 /var/www/cap.org/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('edit', Array)
#14 /var/www/cap.org/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('edit', Array)
#15 /var/www/cap.org/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('formie/forms/ed...', Array)
#16 /var/www/cap.org/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('formie/forms/ed...', Array)
#17 /var/www/cap.org/vendor/craftcms/cms/src/web/Application.php(276): yii\web\Application->handleRequest(Object(craft\web\Request))
#18 /var/www/cap.org/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /var/www/cap.org/web/index.php(21): yii\base\Application->run()
#20 {main}
Additional Information:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'fieldlayouttabs.id' in 'field list'
)

[FR] Integration with payment processor and credit card fields?

Obviously a longer-term question, but I'm wondering if you have any plans to include e-commerce features at some point? Before working with Craft we used WordPress + Gravity Forms and we frequently used their Stripe integration to create donation forms, event registration forms, etc.

Since we're utilizing a custom JS front-end, we should be able to integrate Stripe checkout pretty easily with a couple of hidden fields, but I thought it was worth checking in to see if this was on your radar at all.

Misleading 'Saving' animation in CP

Description

If I change the select in Form > Appearance > Form Templates the 'saving' animation is displayed on the 'Save' Button. But nothing gets saved.

Steps to reproduce

  1. Select custom template in Form > Appearance > Form Templates
  2. Reload page

Expected

Setting is updated or no 'saving in progress' animation

Actual

Setting is not updated

Form settings

CP

Additional info

  • Plugin version: 1.0.8

Option 'Collect IP Addresses' does not work

Description

Even though I checked the option 'Collect IP Addresses' no IP Address is displayed in submission.

Steps to reproduce

  1. Active option 'Collect IP Addresses' in form settings
  2. Submit form in FE
  3. Display submission in CP

Expected

IP Address displayed in right panel

Actual

No IP Address displayed in right panel

Hint

There does not seem to be a column for the IP address in the 'craft_formie_submissions' DB table

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: Yes

Additional info

  • Plugin version: 1.0.4
  • Craft version: 3.4.24

[FR] Send POST data to custom endpoints

To handle a lot of obscure custom integration needs, I'd love to have a method for sending submitted POST data to a custom endpoint. We rely on this feature often in Sprout Forms, with the ability to send to a URL and map form fields.

'Default Label Position' renders weird CSS class in FE

Description

Form CSS class is 'fui-labels-verbb\formie\positions\AboveInput'

Steps

  1. Create Form
  2. Go to Form > Appearance
  3. Select 'Default Label Position' > 'Above Input'
  4. Save
  5. Go to FE Form
  6. Look at HTML

Expected

<form> tag has CSS class fui-labels-above-input

Actual

<form> tag has CSS class fui-labels-verbb\formie\positions\AboveInput

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: No

Additional info

  • Plugin version: 1.0.7

Bug when de-activating JS on a template

Description

Getting this when rendering the form:
Return value of verbb\formie\elements\Form::getFrontEndOutputJs() must be of the type boolean, null returned

Looking at the db, the column outputJs is saved as NULL instead of 0.

Steps to reproduce

  1. Create a template, de-activate JS
  2. Create a form and assign to template.
  3. Try rendering the form.

Form settings

Please pick from the options below.

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: Yes

Additional info

  • Plugin version: 1.1.0
  • Craft version: 3.4.22.1

Edit Error Message for each form

Description

I think it's really cool to edit the error message of a form similar to "Submission Message"?

Steps to reproduce

  1. Edit form
  2. Click Behaviour
  3. Textarea for editing "error message"

Additional info

  • Plugin version: 1.0.3
  • Craft version: 3.4.29

Email notification - test email doesn't work

Description

Getting a
Notification email could not be sent for submission “”.
error when I try and send an email test from the preview screen.

Steps to reproduce

  1. Create a form
  2. Create a notification
  3. Try sending a test email from the preview screen.

Tried on a form with 0 submission, then with 1 submission. Tried an empty email, then All Form Fields email. Default Formie email template.

Form settings

Please pick from the options below.

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: No

Additional info

  • Plugin version: 1.1.0
  • Craft version: 3.4.22.1

Rich text success message displayed as JSON string

Description

The 'flashNotice' does not seem to be converted from Rich Text to Html in 'Page Reload' mode

Steps to reproduce

  1. Create form in CP
  2. Enter formatted text 'Thank you for your message.' in 'Behaviour" > 'Submission Message'
  3. Submit valid form in FE

Expected

Message is 'Thank you for your message.'

Actual

Message is '[{"type":"paragraph","content":[{"type":"text","marks":[{"type":"bold"}],"text":"Thank"},{"type":"text","text":" you for your message."}]}]'

Hint

Works as expected in 'Ajax' mode

Form settings

  • Multi-page form: No
  • Submission Method: Page Reload
  • Client-side Validation: Yes
  • Custom Form Templates: No

Additional info

  • Plugin version: 1.0.7

JS Error for multiple forms on same page

Description

Two forms on one page: The first form is not submittable and throws a JS error:

formie-base-form.js?v=1596058850:1 Uncaught TypeError: Cannot read property 'submitMethod' of undefined
    at t.value (formie-base-form.js?v=1596058850:1)
    at formie-base-form.js?v=1596058850:1
value @ formie-base-form.js?v=1596058850:1
(anonymous) @ formie-base-form.js?v=1596058850:1
setTimeout (async)
(anonymous) @ formie-base-form.js?v=1596058850:1

Steps to reproduce

  1. Create two form on one page
  2. Click submit button of first form

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: No

Additional info

  • Plugin version: 1.0.8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.