Using $form->getValue('xxx') to uploadpath

Home Forums Quform PHP Using $form->getValue('xxx') to uploadpath

This topic is: resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22704
    pvuoti
    Participant

    Hi!

    Im trying to get an uploadform that will get a person name in dropdown list and some another info with uploaded files and sends it all to database (uploaded file as url). I would ike to have the uploaded file in folder of choosed name in dropdown list selection. I have tried to us $form->getValue(‘xxx’) to get a file in certain folder with persons name. Here is an example:

    $name = $form->getValue('name');
    
    /**
     * The path to save any uploaded files. This folder must be writeable by the
     * web server, you may need to set the folder permissions to 777 on Linux servers.
     */
    $config['uploadPath'] = realpath(QUFORM_ROOT . '/uploads/' . $name);
    
    /**
     * Set this to the URL of the above folder to be sent links to uploaded
     * files in the notification email. E.g.
     *
     * $config['uploadUrl'] = 'http://www.example.com/quform/uploads';
     */
    $config['uploadUrl'] = realpath(QUFORM_ROOT . '/uploads/' . $name); 

    but no results. How is it done properly?

    Thanks for the answer!

    Pasi

    #22706
    pvuoti
    Participant

    Nevermind, i figured it out by myself

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy