Coder Social home page Coder Social logo

formbuilder-plugin-public's People

Contributors

mplodowski avatar

Stargazers

 avatar

Watchers

 avatar

formbuilder-plugin-public's Issues

A 2nd FormLog is created when SendEmailMessage::sendAutoresponderMessage() is called

Describe the bug
A 2nd FormLog is created when SendEmailMessage::sendAutoresponderMessage() is called

To Reproduce
Steps to reproduce the behavior:

  1. Create a form in the CMS
  2. Configure Autoresponder for that form
  3. Submit the form on the frontend
  4. Check the FormLogs section of the CMS to confirm that 2 Logs were created for a single form submission.

Expected behavior
Only 1 FormLog should be created per form submission

Screenshots
Capture

October version
2.2.25

Plugin version
2.2.0

Additional context
This problem can be fixed by removing line 59 in formbuilder/listeners/SendEmailMessage.php, in the function sendAutoresponderMessage() remove $this->setHeaders($message);

File uploader field not work

Describe the bug
When I chose file for upload in console appear error

Uncaught TypeError: Cannot read properties of undefined (reading 'trim')
    at Dropzone.addedfile (7c669cc6892212012de8bb83b9c90938-1618552474:748:87)
    at Dropzone.emit (7c669cc6892212012de8bb83b9c90938-1618552474:84:20)
    at Dropzone.addFile (7c669cc6892212012de8bb83b9c90938-1618552474:1830:12)
    at HTMLInputElement.<anonymous> (7c669cc6892212012de8bb83b9c90938-1618552474:1246:24)

To Reproduce
Steps to reproduce the behavior:

  1. Add field with "File uploader" type to form and fill: Name = 'file', Placeholder = 'Attach file'. Default value, CSS classes, Custom attributes, Help block is empty.
  2. Render form on page: {% component "contactForm" %}
  3. Open page with form
  4. Click on 'Attach file' button
  5. Select file and click on 'Open' button
  6. See error in console

Expected behavior
No error in console and attach file

Screenshots

October version
2.1.25

Plugin version
2.1.6

Responsiv.Uploader plugin version
1.0.5

htmlspecialchars() expects parameter 1 to be string, array given

Describe the bug
Unable to create new form, view premade form after fresh plugin install

To Reproduce
Steps to reproduce the behavior:

  1. Install Form Builder plugin on fresh OctoberCMS installation
  2. After installation go to Form Builder - Forms - New form

Expected behavior
Not sure what cause this but the error say htmlspecialchars() expects parameter 1 to be string, array given

Screenshots
https://ibb.co/zhvYdPd

October version
v2,2,24

Plugin version
2.1.7

Additional context
Add any other context about the problem here.

Uncaught ReferenceError: resetForm is not defined.

Describe the bug
When I submit the form via the Snippet, Everything submitted successfully. But the form did not reset. I suspect that it's because it's missing some JavaScript

To Reproduce
Steps to reproduce the behavior:

  1. Add Snippet to page
  2. Save page
  3. Submit the form

Expected behavior
The form refreshes and clears. Instead it introduces a long "load" due to the JavaScript error

October version
2.1.20

Plugin version
2.1.0

Additional context
The Error code is below

Uncaught ReferenceError: resetForm is not defined
    at HTMLFormElement.eval (eval at <anonymous> (framework.js:177), <anonymous>:3:1)
    at i (e9dfb5a5ea48c532720933058a4ee6ea-1637560270:2)
    at framework.js:177
    at u (e9dfb5a5ea48c532720933058a4ee6ea-1637560270:2)
    at Object.add [as done] (e9dfb5a5ea48c532720933058a4ee6ea-1637560270:2)
    at Object.success (framework.js:175)
    at u (e9dfb5a5ea48c532720933058a4ee6ea-1637560270:2)
    at Object.fireWith [as resolveWith] (e9dfb5a5ea48c532720933058a4ee6ea-1637560270:2)
    at k (e9dfb5a5ea48c532720933058a4ee6ea-1637560270:2)
    at XMLHttpRequest.<anonymous> (e9dfb5a5ea48c532720933058a4ee6ea-1637560270:2)
    

Regex validation doesn't work

Describe the bug
My client wants me to stop people entering free e-mail addresses on a form. Regex validation should be able to stop this but I can't get it to work.

To Reproduce
Enter this as validation rules:

required|email|regex:[a-zA-Z0-9]{0,}([.]?[a-zA-Z0-9]{1,})[@](gmail.com|hotmail.com|yahoo.com|hotmail.co.uk|yahoo.co.uk|gmail.co.uk)

I know the pipe character causes issues so Laravel documentation recommends using an array structure instead, but I can't get this to work either... unless I'm doing something wrong?! Quite possible!

['required', 'email', 'regex:[a-zA-Z0-9]{0,}([.]?[a-zA-Z0-9]{1,})[@](gmail.com|hotmail.com|yahoo.com|hotmail.co.uk|yahoo.co.uk|gmail.co.uk)']

I get the error message:
"Method [validate['required','email','regex] does not exist."

October version
Build 465

Plugin version
1.5.0

(Very old versions, sorry — if it'll work on a newer version, I'll upgrade it all.)

resetForm function does not fire

Describe the bug
Hi, I'm having trouble submitting the form. The form is submitted and displays a success message, but the resetForm function does not fire. Has anyone encountered this problem. Thank you

Screenshots
image

October version
3.6.3

Plugin version
4.0.4

Contact Form Sent Successfully but failed to receive the email

Describe the bug
Test send form and did not receive email but in record log I can see all fields entered.

To Reproduce
Steps to reproduce the behaviour:

  1. Go to Editor and select contact page and click Components > Form Builder > Render Form Component
  2. Click Render Form Component and click the name of the Form and save
  3. Go to Contact page and fill out the form and hit submit
  4. Email Client did not receive contact form but Form Log say it has been submitted

Expected behavior
The behaviour seem to me that when I complete the custom contact form and clicked submit button, successfully send form notice and nothing came through my email but appear in Preview Log.

Mail Configuration
Sender Name: Dummy
Sender email: [email protected]
Mail Method: PHP mail

Mail Template

Layout: Default Layout

Form Builder
Details Tab
Sender Email: [email protected]
Sender Name: Dummy Dummy
Mail Template: Default Form Template

Recipients Tab
Email: [email protected]

Screenshots
If applicable, add screenshots to help explain your problem.

October version
2.2.24

Plugin version
2.2.0

Additional context
Written guide to assist customers how to setup basic contact form with test working configuration would be great

Update breaks everything

After an update to version 2.1.0 from 1.5.0 everything is broken.
The reason is that migrations from earlier versions got changed and new fields got added in these migrations.
This way, when updading from anything <v2.0.0 the database is not getting updated with the correct fields and is in an invalid state.
I have to manually change the table structure to make it work again.
Please provide a patch release that adds the migrations on top instead of changing migrations of old versions.

Multi Page Forms

It would be great to design multi page forms, using a custom field to split the form in two or more segments. This custom field could be titled "Page Splitter" (similar to the current "Section") and allow one to define the text for the next/previous links at that point. Clicking a next button, hides all form fields before the splitter and shows the next group of input fields. Also ideal would be a progress indicator of some sort as a separate non-editable field.

An alternative way would be to create a separate tab "Pages" for forms that allows users to set up the pages, which can then be allocated to form fields.

Unable to submit the form

Describe the bug
"Trying to access array offset on value of type null" on line 143 of /home/buildingpixels/public_html/plugins/renatio/formbuilder/traits/RenderFormAjax.php
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...' https://buildingpixelsacademy.com/
  2. Click on '....' submit the form
  3. Scroll down to '....' a pop up with above mentioned message is popping up , we are using OC 2 version
  4. See error

Expected behavior
when we submit the form it needs to redirect to thankyou page instead its popping an error alert
formsubmission error

Screenshots
If applicable, add screenshots to help explain your problem.

October version
October cms version : 2.1.6

Plugin version
Form Builder version : 1.5.0

Additional context
error triggering when we submit the form from frontend only.. we have submitted using test form in the backend we received emails and its working properly... which means there is an issue in the frontend its which we are unable to getit

Use HTML inside label in checkbox

Hello,

Is It possible to create checkbox where you have inside label?

Why? In all form you need to have some kind of before submit button: I agree with Terms&Condition, and then you have like:

I agree with Terms&Condition.

Thanks.

Cannot Access the Backend After Update

Describe the bug
I cannot access the form builder backend. Alternatively I cannot access the pages part of my backend as well. Everything isn't translated and has some remnant translation code displaying on the other parts of the backend. Wherever the component is, it says that some trait is not found

To Reproduce
Steps to reproduce the behavior:
Install Plugin
Try to open the plugin page

Expected behavior
Plugin page appears and I can build a form.
Screenshots
image

October version
2.1.20

Plugin version
2.1.0

Error on submit "renderForm::onSubmit"

I`ve try to add a form fields to a partial page. I'm using one of defaults forms. But when try to fill the form and hit SUBMIT button give's me this error
"AJAX not found renderForm::onSubmit". I already add {% framework extras %}
{% scripts %} to my Layout but still presist this error. In log manager of plugin not show up.

To Reproduce Steps to reproduce the behavior:

  1. Add component to a partial (not to a page)

  2. Go to contacts page

  3. fill up form

  4. click on SUBMIT
    The error: AJAX not found renderForm::onSubmit

`POST https://www.divinemobili.com/contact 500
(anonymous) @ VM8633:1
send @ jquery.min.js:2
ajax @ jquery.min.js:2
Request @ framework.js:403
$.fn.request @ framework.js:473
documentOnSubmit @ framework.js:579
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2

`
Expected behavior To submit the form

Screenshot-2021-11-30-160623

October version
v2.1.21

Plugin version
v2.1.5

Support October v3 BETA

Describe the bug
Have an issue with sending a message. Created a webform and when I submit in the frontend it displays a popup saying There was an error. Please try again!.
If I select no template it works but then you don't get any information through.

Screenshots
If applicable, add screenshots to help explain your problem.

October version
3.0.23

Plugin version
2.1.7

Looking in the error logs theres nothing. Only under the browsers inspection console I get error 500 with the jquery file. Jquery loaded correctly and also framework tags and scripts. Under Form Logs, there is no subject, sender etc but when you click into it you can see under Form Data that there is data passed through.

Placeholder in textarea not showing

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Add field with textarea type
  2. Fill placeholder and name. Default value leave blank
  3. Open page with form
  4. Placeholder in textarea not showing

Expected behavior
Expect display placeholder in textarea.

Screenshots
If applicable, add screenshots to help explain your problem.

October version
2.1.26

Plugin version
2.1.6

Additional context
Placeholder not show because textarea not empty and contain 18 spaces although default falue is empty.
If set default value, value display in textarea without any spaces.
I tryed duplicate textarea text field and remove all twig variables from textarea in template. Problem continue reproducing.
But when I add textarea element to a page no one spaces in textarea and placeholder desplaying.

Can we support Tailwind?

Hi, I see your plugin is supporting bootstrap 5. We buyed your plugin on octobercms but we cannot apply Tailwind theme. How can we do this?

Fil upload filed issue

HI,
we have a job application form where user fille below fields
name , email , cover letter , a hidden filed where we will insert default job application id or job application name and resume attachment

when we submit the form we are able to receive name,, email , cover letter and
missing resume and job application name ( which we need to fill by default using the get parameter

issue here

  1. file not getting attached to the email
  2. Default job name was not retrieve , used PHP code still same issue
    pls revert on this asap

we have paid subscription for FORM BUILDER

Cannot Submit Form -

Describe the bug
I cannot submit the form via the pages plugin snippet

To Reproduce
Steps to reproduce the behavior:
Add form to static page via snippet
Submit the form

Expected behavior
The Form Submitted and I get a log in the backend

October version
October 2.1.20

Plugin version
2.0.1

Additional context
Here's the stack trace

ErrorException: Trying to access array offset on value of type null in /home/artistro08/.sites/procedural-tech/plugins/renatio/formbuilder/traits/RenderFormAjax.php:143
Stack trace:
#0 /home/artistro08/.sites/procedural-tech/plugins/renatio/formbuilder/traits/RenderFormAjax.php(143): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /home/artistro08/.sites/procedural-tech/plugins/renatio/formbuilder/traits/RenderFormAjax.php(109): Renatio\FormBuilder\Components\RenderForm->checkFileRequired()
#2 /home/artistro08/.sites/procedural-tech/plugins/renatio/formbuilder/traits/RenderFormAjax.php(32): Renatio\FormBuilder\Components\RenderForm->makeValidator()
#3 /home/artistro08/.sites/procedural-tech/modules/cms/classes/ComponentBase.php(187): Renatio\FormBuilder\Components\RenderForm->onSubmit()
#4 /home/artistro08/.sites/procedural-tech/modules/cms/classes/Controller.php(874): Cms\Classes\ComponentBase->runAjaxHandler()
#5 /home/artistro08/.sites/procedural-tech/modules/cms/classes/Controller.php(739): Cms\Classes\Controller->runAjaxHandler()
#6 /home/artistro08/.sites/procedural-tech/modules/cms/classes/Controller.php(375): Cms\Classes\Controller->execAjaxHandlers()
#7 /home/artistro08/.sites/procedural-tech/modules/cms/classes/Controller.php(222): Cms\Classes\Controller->runPage()
#8 /home/artistro08/.sites/procedural-tech/modules/cms/classes/CmsController.php(50): Cms\Classes\Controller->run()
#9 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Cms\Classes\CmsController->run()
#10 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#11 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch()
#12 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\Routing\Route->runController()
#13 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\Routing\Route->run()
#14 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#15 /home/artistro08/.sites/procedural-tech/plugins/rainlab/translate/classes/LocaleMiddleware.php(29): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#16 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): RainLab\Translate\Classes\LocaleMiddleware->handle()
#17 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#18 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#19 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#20 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#21 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle()
#23 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#24 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#25 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#26 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#27 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\Pipeline\Pipeline->then()
#29 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Router->runRouteWithinStack()
#30 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\Routing\Router->runRoute()
#31 /home/artistro08/.sites/procedural-tech/vendor/october/rain/src/Router/CoreRouter.php(31): Illuminate\Routing\Router->dispatchToRoute()
#32 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): October\Rain\Router\CoreRouter->dispatch()
#33 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#34 /home/artistro08/.sites/procedural-tech/plugins/offline/responsiveimages/classes/ResponsiveImagesMiddleware.php(30): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#35 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): OFFLINE\ResponsiveImages\Classes\ResponsiveImagesMiddleware->handle()
#36 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /home/artistro08/.sites/procedural-tech/vendor/october/rain/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(23): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
#38 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
#39 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Pipeline\Pipeline->then()
#41 /home/artistro08/.sites/procedural-tech/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#42 /home/artistro08/.sites/procedural-tech/index.php(43): Illuminate\Foundation\Http\Kernel->handle()
#43 /home/artistro08/.config/composer/vendor/cpriego/valet-linux/server.php(232): require('/home/artistro0...')
#44 {main}

Export single form

Hi there,

I have a client that has multiple websites and different forms on his websites. Sometimes he wants to copy a form from 1 site to the other, but the export function currently exports all forms.

Is it possible to add a export button for 1 single -selected- form?

Thanks in advance!

Forms not working after update

After updating OctoberCMS and packages, the forms give the following message:Form with code "contact-form" does not exist! Did you select correct form in component settings?

The Form Builder button is visible in the backend. When I click I get the message: Page error. We're sorry, but something went wrong and the page cannot be displayed.

Is it possible that the latest version of the form builder plugin is not compatible with octobercms V1?

October version
Build 474 (V1)

Plugin version
2.1.6

Snippet Form cannot find AJAX Handler 'renderForm::onSubmit'

When using the "Render Form Component" snippet inside a static page (variable, not the content field), the form gets rendered to the page but cannot be submitted. On submit an alert shows up "AJAX Handler 'renderForm::onSubmit' cannot be found" and the POST to the same page produces an error 500.

When using the "Render Form Component" component inside a CMS page, everything works fine.

October v3.4.15

Plugin v3.1.2

Error Sending Form After Updating to 2.1.0

Describe the bug
I have updated to the latest version of the plugin 2.1.0 and run the database patch. Now when a form is submitted an alert window pops up with a 'something went wrong' message.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a form on the front end
  2. Complete the form fields
  3. Click submit
  4. Alert message pops up with 'something went wrong' alert message

Expected behavior
I expected the form to submit

Screenshots
Screen Shot 2021-11-22 at 15 24 29

Screen Shot 2021-11-22 at 15 40 38

October version
2.1.21

Plugin version
2.1.0

Additional Details
I am extending the FormBuilder plugin to dynamically set the recipient name and email before the message is sent.

     public function boot() {
      \Event::listen('formBuilder.beforeSendMessage', function ($form, $data) {
        $form->to_email = $data['recipient_email'];
        $form->to_name = $data['recipient_name'];

      });

Hope you can help.

Cy

Send from to specific e-mail, according to dropdown select box

Is your feature request related to a problem? Please describe.

I need that a form is sent to a specific e-mail as follow:

Client would select a Store Location on the form as shown:
Location 1
Location 2
Location 3

Then, the form should be sent to specific e-mail according to location selected. Example:
If client selects Location 1, the form should be sent to email_1
If client selects Location 2, the form should be sent to email_2
If client selects Location 3, the form should be sent to email_3

Is there a way to workaround with this feature?

Thank you in advance!

The field type field is required

On a fresh install / forced update the plugin fails to run seed_contact_form.php and seed_default_form.php. The reinstall / forced update fails with "The field type field is required".

The same happens when exporting two forms and reimporting them: See screenshot.

The same error message also appears when trying to add a form field to an existing form. The field cannot be saved.

{
    "#layout-flash-messages": "    <div data-control=\"flash-message\" class=\"oc-hide\" data-type=\"error\" data-interval=\"5\">The Field type field is required.<\/div>\n",
    "X_OCTOBER_ERROR_FIELDS": {
        "field_type": [
            "The Field type field is required."
        ]
    }
}

Note that the plugin has worked fine initially and started doing this after a reinstall to try to fix another problem. I ran php artisan plugin:refresh Renatio.FormBuilder and forced an update through the October panel. Redoing this a couple of times eventually leads to a point where everything works again, so I assume that this is some kind of race condition or a caching issue.

Screenshot 2023-09-08 at 09 49 14

October v3.4.16

Plugin v3.1.3

Duplicate form with no field types

Describe the bug
When duplicating a form, its fields are lost

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Forms list'
  2. Click on 'Duplicate'
  3. Click on new form switch to fields
  4. It's emrty

Expected behavior
In duplicate action after a replicating the form you get fields from replicated form. But you should get fields from original form

Fix
In actions/DuplicateForm.php change row 24 from:
foreach ($copy->fields as $field) {
to:
foreach ($this->form->fields as $field) {

October version
2.2.27

Plugin version
2.2.0

Additional context

Screen Shot 2022-10-13 at 23 22 51

FileUploader onRun Does Not Run, Does Not Inject Assets

When using a file uploader field, the needed JS and CSS assets do not get injected. (The onRun method of the File Uploader component, where addJS() and addCSS() are called, is never executed.)

October v3.4.15

Plugin v3.1.3

File Upload - Required

Describe the bug
I created a form with field "file uploader". I want it to be mandatory.
So, in validation I put "required".
However, this is not working as the system doesn't recognize the attached file.
Did I need to introduce another way of validation? Can you give me some help on this?
Thank you in advance!

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'link here'
  2. Try to attach a file
  3. Submit form
  4. See error

Expected behavior
File uploader should be mandatory.

Screenshots
Captura de ecrã 2022-04-04, às 19 36 28

October version
2.2.15

Plugin version
2.1.6

Additional context
Add any other context about the problem here.

Form submit 500 error

On upgrading to October 2.2.35 and plugin 2.2.0 I cannot send forms.

Each submission returns a 500 from the server now instead of submitting the form successfully to the user.

Strangely enough the form does go into the form log but the user never sees the success state.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://staging.7thsense.one/form-test
  2. Fill in the form
  3. Submit the form
  4. See error

October version
2.2.35

Plugin version
2.2.0

File upload file being attached to wrong form log

Describe the bug
Form attachments are getting saved to the wrong form log. We have large volumes of traffic and people are filling in forms at the same time and it causes the attachment to be attached to the wrong log.

To Reproduce
Steps to reproduce the behaviour:

  1. Start to complete a form and upload a file for submission.
  2. Then in a separate browser or even computer also start to submit a form. (It does not have to be the same form)
  3. Submit the second form before submitting the form with the file ready to be uploaded the file is attached to the second form log.
  4. submit the first form and no file is attached even though it is in the form data

October version
2.2.35

Plugin version
2.2.0

Additional context
I can see the file get added to system_files with these fields not filled in (field, attachment_id, attachment_type). Then when the second form is submitted the field name and form log ID are added but it is the log from the second form with no upload fields. Should the file not get added to the system_files table with some kind of session_id so it can only then be linked with the form log with the same session_id?

Array to string conversion in _raw_fields_popup.htm

Describe the bug

"Array to string conversion" on line 13 of 
/html/plugins/renatio/formbuilder/controllers/forms/_raw_fields_popup.htm

To Reproduce
Steps to reproduce the behavior:

  1. Edit any form
  2. Click on the fields tab
  3. Click Raw Fields Markup

Expected behavior
A popup appears to edit the form HTML

Screenshots
View

October version
2.1.22

Plugin version
2.1.5

Hidden field with page title or slug, url

Hi, please advice and maybe an idea for a new field. Is there some way to submit a custom variable along with the form using a hidden field or creating a custom field. In the form I need to send the title or slug or url of the page from which the form is sent.

Thank you

Using static pages variable field for selecting a form

Hi there,

My client is working with a lot of different forms and wishes to choose which form renders on a page.

For managing pages and content, we use Static Pages, and I made a custom field ("use_form") in a layout file. But there is an issue when I load the RenderForm component with that dynamic value. I always get the error:

'Form with code "(my chosen form)" does not exist! Did you select correct form in component settings?'

I tried using the snippets, that works fine, but it only shows the default component markup, not the overrided component markup in my theme.

So my question is: is there a way to select a form dynamically with static pages?

Thanks in advance!

Cannot update from v3.1.x to v4.0.x

I want to update the form builder. I get feedback that it's successful, however, the version will remain the same (v3.1.x) and is not updated to v4.0.x.

Using OC v3.6.10 and I'm doing it locally (MAMP).

Any thoughts?

Problem with new events (fixed)

Describe the bug
it is impossible to change an object in an event

Fix
was:
event('formBuilder.overrideForm', [$this->form]);
became
event('formBuilder.overrideForm', [&$this->form]);

and Event::listen('formBuilder.overrideForm', function (&$form) with &

same in other events
was:
event('formBuilder.formSubmitted', [$this->form]);
became:
event('formBuilder.formSubmitted', [&$this->form]);

Plugin version
4.0.5

Additional context
Problem with new events

Use options value in mail templates for checkboxes

At the moment checkboxes have the value 1. When sending an email this is displayed as label: 1.

Can we use the options array instead to override the displayed text?

Alternatively, is something like this possible?

{% for field in form.getData() %}
    {% if field is same as('checkbox' %}
        {{field.options[field.value]}}
    {% else %}
        **{{ field.label }}:** {{ field.value }}
    {% endif %}
{% endfor %}

For that getDate would also need to supply options and type.

Note that something like the following does not work inside an email template:

{% set form_data = form.getData() %}

{{form_data['field_name'].label}}

Do email templates only support a subset of twig tags?

Questions to file uploader

Hello,
I have three questions about the file uploader enhancement:

  1. Can I make the field required depending on another field. In my case I have two radio buttons with option yes and no. If yes is checked I show the file upload (via jQuery) and I would like to make it required. If no is checked I hide the file upload and I don't want it to be required.

  2. How can I set that the file upload should be only one single file?

  3. I set in the validation following: mimes:jpeg,pdf
    But the file uploader somehow has all types allowed. What am I doing wrong there?

[ERROR] Migration failed. Check output above

I'm getting an issue when installing the plugin, where its telling me the migration has failed. The connection is fine and the DB works (been an active install for the last week and installed other plugins).

Heres the error::

❯ php artisan project:sync
Synchronizing Project...
All packages already installed
Executing: composer update
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
> System\Console\ComposerScript::postAutoloadDump
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.
87 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> System\Console\ComposerScript::postUpdateCmd

* You are using October CMS version: v3.0.11
Checking Dependencies...
All dependencies installed
Checking Themes...
All themes checked
Executing: php artisan october:migrate

Migrating application and plugins...
System
Nothing to migrate.
Backend
Nothing to migrate.
Cms
Nothing to migrate.
Editor
Nothing to migrate.
Media
Nothing to migrate.
RainLab.Deploy
- Nothing to update.
Renatio.FormBuilder

 [ERROR] Migration failed. Check output above

October CMS Build: 3.0.11

Another odd thing is that the menu item is in the backend, but when you go into the Package manager, its not there, nor is it in the plugin folder.

Any ideas?

Many thanks

Geolocation field type

Is your feature request related to a problem? Please describe.
The Request is not related to a Problem, Just a new feature.

Describe the solution you'd like
I like to see a field type for Geolocation, if used is gived the user a latitude/longitude of his current location.
The geolocation should automatic update and should be send in the notification via Mail.

Describe alternatives you've considered
I tried to code it myself, but my knowledge of javascript is not that great, I myself had created a geolocation.js that provides the location, Then tried to place it in a disabled textfield but unfortunately it didn't work.

Additional context
Geolocation-screenshot-20221013

Error: Trying to access array offset on value of type null

Hello,

I come across the next error after filling in a form: "Trying to access array offset on value of type null".

Steps to reproduce the behaviour:

  1. Install plugin Form Builder
  2. Create a form in the Form Builder
  3. Add the 'Render Form Component' to a page
  4. Select the appropriate alias, form and redirect to the component. Save.
  5. Fill out the fields of the form at the front-end
  6. See the above error

Expected behaviour:
To have the form submitting the form values

October version: Build 474 (V1)
Plugin version: 1.5.0
PHP: 7.4
Event log: ErrorException: Trying to access array offset on value of type null in plugins/renatio/formbuilder/traits/RenderFormAjax.php:143

Any idea how to fix this?

Thanks!

Best regards,
Jacco van den Berg

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.