Jump to content

Recommended Posts

Posted

Hi


 


Not able to add image fields in FormTemplateProcessor................HELP


Error: Exception: New page '/CMS/ProcessWire/embedded-c//' must be saved before files can be accessed from it (in Z:\web\CMS\ProcessWire\wire\core\PagefilesManager.php line 167)


Posted

You got the problem right there in the error message. A page need to first be saved before images can be added or loaded. I think the from processing tries to render image field with the uploaded image but isn't really yet uploaded or saved.

Not sure what you're using this for but FormTemplateProcessor isn't meant to work with file fields and also not recommended for front end forms with uploads. Kinda big security risk there.

There's some examples around for different forms for front-end with file uploads.

http://processwire.com/talk/topic/2089-create-simple-forms-using-api/ long thread with various things.

Some examples you'll find in my gists namely

https://gist.github.com/somatonic/5236008



https://gist.github.com/somatonic/4150974

  • Like 4
Posted

The FormBuilder module also supports front-end file/image uploads in a secure manner. FormTemplateProcessor was just made as a proof of concept for people to adapt and build upon where useful. Whereas FormBuilder is a full system. 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...