Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
I have to deal with mail forms and user_uploads. Is there a way to use <cms:input name="documents" type="file" required="required"/> or similar?
Please see viewtopic.php?f=5&t=10750
There is a type 'uploadfile' <cms:input> discussed in there. I think that is what you are looking for.

Hope this helps.
KK wrote: There is a type 'uploadfile' <cms:input> discussed in there. I think that is what you are looking for.

Unfortunately not. This is, what I did:

1. Added to kfunctions.php
Code: Select all
require_once( K_COUCH_DIR.'addons/phpmailer/phpmailer.php' );

2. Created and setup couch/addons/phpmailer/config.php
3. Activate PHPMailer in config.php via define( 'K_USE_ALTERNATIVE_MTA', 1 );
4. Added input button to the form
Code: Select all
<cms:input type='uploadfile' name='lebenslauf_ex' required='1' allowed_ext='pdf' max_size='204800000'/>

Output: ERROR: Tag "input" has unknown type "uploadfile"
Which version of Couch are you using?
Please switch to the latest (from GitHub or this site) and you'll find type 'uploadfile' in it.

Hope this helps.
I am sorry, but I am using the latest couch version and the problem still exists.
This is my kfunctions.php:
Code: Select all
if ( !defined('K_COUCH_DIR') ) die();
require_once( K_COUCH_DIR.'addons/phpmailer/phpmailer.php' );
require_once( K_COUCH_DIR.'addons/cart/session.php' );
Did I miss something?
I just checked using the latest version of Couch from GitHub and had no problem displaying the said input.
Both the ways of activating the phpMailer addon (i.e. including in kfunctions.php or setting the alternative MTA in config) are working just fine.
I set in config.php:
Code: Select all
$cfg['method'] = 'mail';

Does type="uploadfile" expect smtp oder something else?
Config setting (which, BTW, is correct) has no bearing on the 'input not found' error.
8 posts Page 1 of 1

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests