dhruba Posted August 7, 2013 Share Posted August 7, 2013 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) Link to comment Share on other sites More sharing options...
Soma Posted August 7, 2013 Share Posted August 7, 2013 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 4 Link to comment Share on other sites More sharing options...
ryan Posted August 9, 2013 Share Posted August 9, 2013 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. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now