Pinegrow WP Form - file input support

Hello,

I often use Pinegrow WP’s Form feature, which I really like because of how quick it is to add dynamic form functionality to bespoke HTML markup.

However, this time I’d need to add a file input ( <input type="file"> ) to my form. I tested, and only the filename gets recorded in custom post’s data within the admin. I haven’t tested what ‘Send to email’ does (since I’m on localhost), but I assume it would also forward the filename only to the the recipient.

Is there a way to setup PG WP forms the way, that they handle file inputs? If there is no such feature, do you think there’s a way to create a custom callback function (which you can call in form’s settings), that handles the submissions’ file content somehow?

Thank you in advance!

Kind regards,
Márton Lente

Hi @martonlente,
Hmm, on first thought, I don’t think it would be that easy to modify the Pinegrow form for file upload. Can you use a WordPress plugin with shortcode instead?
Cheers,
Bob

Hello,

Thanks @RobM. So that you say, it’s for sure, that file input isn’t yet supported in PG Form? Is this correct?

If possible, I wouldn’t use shortcode-based WP form plugins for the task (I’d prefer to keep the theme plugin dependency low). Since PG Form is capable of handling a callback function, I see this an opportunity to add this functionality through a custom function. Do you think it’s possible?

If this isn’t possible or moderately complex, can you suggest any third-party solution, that I could use instead of PG Forms for the task? I’d need something, that’s easy to implement into bespoke HTML form markup, and also can handle file inputs on submission. I know Freshforms which is great, but is relatively costly – I’m searching for a similar solution, that also is maybe self-hosted.

Thank you for your tips in advance!

Kind regards,
Márton Lente

More precisely, not supported & not planned at this time.

Hi @martonlente,
I guess It maybe would be possible. You are going to have to change the form encoding and where the post is sent. I think it might be quicker to write it from scratch if you have the knowledge.
Bob

Hello,

Thank you for your answers. I ended up implementing Contact Form 7 (and Flamingo for storing submissions) plugins by calling a shortcode, which together perfectly do the job.

I don’t really like the fact that now part of the markup lives in the database, but the file input support, and the added level of customizability well makes up for it. Still, file input support for PG Forms would be a nice addition in future.

Kind regards,
Márton Lente

Hi @martonlente,
You can see @Emmanuel’s answer above. Support of this type is really complex. That is the reason why form plugins are so popular. There are a lot of moving parts and options.
Cheers,
Bob

Hi @RobM,

Sure: completely understandable – it was just a subtle feature request, the current implementation of PG Forms is more than perfect in so many cases. :slightly_smiling_face:

I’m aware that having file inputs in simple forms is not that common.

Kind regards,
Márton Lente