mplodowski / formbuilder-plugin-public

https://octobercms.com/plugin/renatio-formbuilder
https://octobercms.com/plugin/renatio-formbuilder
2 stars 0 forks source link

Fil upload filed issue #41

Closed kgangadhar closed 6 months ago

kgangadhar commented 6 months ago

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

mplodowski commented 6 months ago

Hi,

I need more details to look into this.

Please write what October, Laravel and FormBuilder plugin version you are using?

Do you have this form online so I can check it?

What code are you using to set default value from get parameter?

kgangadhar commented 6 months ago

October CMS 3 Form Builder 4.0.3

https://xorbit.us/job-details/software-engineer

i'm taking job slug as get parameter

function onStart() { $jobname = $this->param('slug'); $this['jobname'] = $jobname; }

used jobname / this.jobname as deault parameter in the applied for field which is an hidden field in the form [image: image.png]

[image: image.png]

On Tue, 27 Feb 2024 at 13:51, Michał Płodowski @.***> wrote:

Hi,

I need more details to look into this.

Please write what October, Laravel and FormBuilder plugin version you are using?

Do you have this form online so I can check it?

What code are you using to set default value from get parameter?

— Reply to this email directly, view it on GitHub https://github.com/mplodowski/formbuilder-plugin-public/issues/41#issuecomment-1966012066, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRY3DZD3D6AFWKU4OFSIQ3YVWJQXAVCNFSM6AAAAABD3TBPUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGAYTEMBWGY . You are receiving this because you authored the thread.Message ID: @.***>

--

Best Regards

Gangadhar K WhatsApp https://wa.me/9110373459 | Call <9966933849> | Email @.***>

mplodowski commented 6 months ago

I don't think function onStart will work in this case.

You can use plugin extension function like so to add data to form:

\Event::listen('formBuilder.extendFormData', function ($data) {
    $data['job_id'] = request()->segment(2);

    return $data;
});

This code should be run in your custom plugin boot() method.

Now you will have access to {{ job_id }} in mail template.

As for mail attachment please go to resume field in the backend and check if in Upload Options you have checked "Send uploaded files as mail attachments".

Zrzut ekranu 2024-02-27 o 10 51 14

Also check form logs if you have form attachment there.

kgangadhar commented 6 months ago

[image: image.png]

its created using tailer

On Tue, 27 Feb 2024 at 15:23, Michał Płodowski @.***> wrote:

I don't think function onStart will work in this case.

You can use plugin extension function like so to add data to form:

\Event::listen('formBuilder.extendFormData', function ($data) { $data['job_id'] = request()->segment(2);

return $data;

});

This code should be run in your custom plugin boot() method.

Now you will have access to {{ job_id }} in mail template.

As for mail attachment please go to resume field in the backend and check if in Upload Options you have checked "Send uploaded files as mail attachments".

Zrzut.ekranu.2024-02-27.o.10.51.14.png (view on web) https://github.com/mplodowski/formbuilder-plugin-public/assets/6774277/90a8b9f8-527c-4b59-82e8-2a2ad87991d3

Also check form logs if you have form attachment there.

— Reply to this email directly, view it on GitHub https://github.com/mplodowski/formbuilder-plugin-public/issues/41#issuecomment-1966175015, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRY3D5NVOWFHSGDVFZBIBTYVWUJJAVCNFSM6AAAAABD3TBPUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGE3TKMBRGU . You are receiving this because you authored the thread.Message ID: @.***>

--

Best Regards

Gangadhar K WhatsApp https://wa.me/9110373459 | Call <9966933849> | Email @.***>

kgangadhar commented 6 months ago

[image: image.png]

no email attachment

On Tue, 27 Feb 2024 at 15:32, Gangadhar K @.***> wrote:

[image: image.png]

its created using tailer

On Tue, 27 Feb 2024 at 15:23, Michał Płodowski @.***> wrote:

I don't think function onStart will work in this case.

You can use plugin extension function like so to add data to form:

\Event::listen('formBuilder.extendFormData', function ($data) { $data['job_id'] = request()->segment(2);

return $data;

});

This code should be run in your custom plugin boot() method.

Now you will have access to {{ job_id }} in mail template.

As for mail attachment please go to resume field in the backend and check if in Upload Options you have checked "Send uploaded files as mail attachments".

Zrzut.ekranu.2024-02-27.o.10.51.14.png (view on web) https://github.com/mplodowski/formbuilder-plugin-public/assets/6774277/90a8b9f8-527c-4b59-82e8-2a2ad87991d3

Also check form logs if you have form attachment there.

— Reply to this email directly, view it on GitHub https://github.com/mplodowski/formbuilder-plugin-public/issues/41#issuecomment-1966175015, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRY3D5NVOWFHSGDVFZBIBTYVWUJJAVCNFSM6AAAAABD3TBPUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGE3TKMBRGU . You are receiving this because you authored the thread.Message ID: @.***>

--

Best Regards

Gangadhar K WhatsApp https://wa.me/9110373459 | Call <9966933849> | Email @.***>

  • we are committed to safeguard the environment and promote green initiatives across our operations. Please don't print this document unless you really need to. Every 3000 sheets of paper cost us a tree. Let’s work together to preserve the environment for future generations*

--

Best Regards

Gangadhar K WhatsApp https://wa.me/9110373459 | Call <9966933849> | Email @.***>

mplodowski commented 6 months ago

Your attached images are not visible on github.

kgangadhar commented 6 months ago

image still no attachment was found in the email check email screenshot image

its error on this page https://xorbit.us/job-details/software-engineer image image

mplodowski commented 6 months ago

If you want to use this code in php section then you must wrap it in function:

function onStart() {
    \Event::listen('formBuilder.extendFormData', function ($data) {
        $data['job_id'] = request()->segment(2);

        return $data;
    });
}

As for attachments please check form logs if they have it. Also please send me screenshots how you configure file upload field. Attributes and Validation tabs.

kgangadhar commented 6 months ago

image

image

image

mplodowski commented 6 months ago

If your log is empty, than this is probably why file uploads are not working:

Please check following config if it is enabled:

Zrzut ekranu 2024-02-27 o 17 53 40

kgangadhar commented 6 months ago

Fiel uploads working

But still issue with the job ID infield value in hidden filed

In form builder 2 , we used to do it manually by expanding the component and based on the filed types...

But in form builder 3 , we are unable understand that could you pls suggest how to do it using filed type

On Tue, 27 Feb 2024, 22:26 Michał Płodowski, @.***> wrote:

If your log is empty, than this is probably why file uploads are not working:

Please check following config if it is enabled:

Zrzut.ekranu.2024-02-27.o.17.53.40.png (view on web) https://github.com/mplodowski/formbuilder-plugin-public/assets/6774277/8ac54840-e5b5-422f-a96a-3fe5a50d5dd6

— Reply to this email directly, view it on GitHub https://github.com/mplodowski/formbuilder-plugin-public/issues/41#issuecomment-1967117594, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRY3DZSJLDG5AS3ULD2MZLYVYF2FAVCNFSM6AAAAABD3TBPUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRXGEYTONJZGQ . You are receiving this because you authored the thread.Message ID: @.***>

kgangadhar commented 6 months ago

image

you can see here job_id unable fetch it .. need help on this

mplodowski commented 6 months ago

Disable or remove your hidden field, then add the code I mentioned before to the code section of the page:

function onStart() {
    \Event::listen('formBuilder.extendFormData', function ($data) {
        $data['job_id'] = request()->segment(2);

        return $data;
    });
}
kgangadhar commented 6 months ago

Still not able to see job application id / slug neither in the mail template nor in the form submitted data attached all screenshots

image

image image image

and also need a guidance how to create a category and subcategory for example

mplodowski commented 6 months ago

You are using jobname, so in mail template it will be available as {{ jobname }}.

As for category and subcategory you just create select fields and provide options. You can check country and state select fields in plugin source code for some insights.

kgangadhar commented 6 months ago

Tried all types

Like jobname , job_id.. what ever It's not working at all

Can use nested items type for categories and subcategories in tailer blueprint

On Wed, 28 Feb 2024, 19:09 Michał Płodowski, @.***> wrote:

You are using jobname, so in mail template it will be available as {{ jobname }}.

As for category and subcategory you just create select fields and provide options. You can check country and state select fields in plugin source code for some insights.

— Reply to this email directly, view it on GitHub https://github.com/mplodowski/formbuilder-plugin-public/issues/41#issuecomment-1969007161, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRY3D5KWHV6H4I3YRWWLI3YV4XPNAVCNFSM6AAAAABD3TBPUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGAYDOMJWGE . You are receiving this because you authored the thread.Message ID: @.***>

mplodowski commented 6 months ago

Change onStart() to onInit().

kgangadhar commented 6 months ago

Still no luck

kgangadhar commented 6 months ago

pls share your email i will share admin logins you an cross check with the issue behind if possible

mplodowski commented 6 months ago

michal.plodowski@gmail.com

kgangadhar commented 6 months ago

Thank you for the incredibly prompt assistance and unwavering dedication to support. Your commitment to providing quick and helpful responses is truly commendable.