Hello
I make a form which allows web-users to create new documents. I use this tutorial
http://modxrules.com/articles/new-documents-with-eform
So I`d like to allow users to upload their files. In my snippet I add
$customValues = array();
$customValues['tmplvarid'] = 8;//ID of the TV
$customValues['contentid'] = $newId; //The ID of the DOCUMENT
$customValues['value'] = $modx->db->escape($fields['ufile']);
$modx->db->insert( $customValues, $modx->getFullTableName('site_tmplvar_contentvalues') );
And I create TV - [*ufile*], type - file, and in my form template I add
<input type="file" name="ufile" eform="Title::1" />
But in a new document I have static text in my TV
a91.jpg
instead adding file.
Any help will be appriciated.