Sorry, more input now.
I have a formit form with a (required) name field, an email field and a message field. Additionally the upload button via AjaxUpload for PDFs.
The formit call is:
[[!FormIt?
&preHooks=`Formit2AjaxUpload`
&hooks=`AjaxUpload2Formit,email,redirect`
&ajaxuploadFieldname=`upload`
&ajaxuploadTarget=`uploads/[[+name]]/`
&ajaxuploadUid=`upload`
…
<form action= …
…
<p>
<label for="name">Name<strong>*</strong>[[!+fi.error.name:notempty=`<span class="error"> bitte ausfüllen</span>`]]</label>
<input type="text" id="name" name="name" value="[[!+fi.name]]">
</p>
…
</form>
And I want to get the sub directory for uploads created by the name of the sender after submitting the form. So I can handle all applications separately.
I think, I need a custom hook … but how??
I tried the placeholder [[+name]] like described above but this creates endless sub directories named [[+name]] and not a single directory with the real name of the name fields content.
In this post: Formit setting from input fields there is an example for the formit call with
&emailFromName=`[[+firstname]] [[+lastname]]`
Seems identically like my
&ajaxuploadTarget=`uploads/[[+name]]/`
Maybe the AjaxUpload itself has issues with this placeholder and can’t handle it this way??