The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Image upload and resize - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Image upload and resize (/showthread.php?tid=872)



Image upload and resize - sumanguj - Oct 1st, 2010

I got this simple html form working although there seems to be some problem when viewing since the path isn't right. this can be ignore of course since its uploaded successfully and saved in the upload folder :
Code:
<form action="http://mydomain.com/formtools/process.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="form_tools_form_id" value="6" />
Upload: <input type=file name=upfile><br>
Description: <input type=text name=note><br>
<br>
<input type=submit value=Press> to upload the file!
</form>

my ONLY concern is to resize these uploaded images before transferring it to the server. i dont want 2-3MB image files. all i want is a 80-90 quality JPG images with not more than 800*600 pixels.

how can i achieve this? there's nothing mentioned in the documentation nor in the forums. please help.


RE: Image upload and resize - Ben - Oct 1st, 2010

Hi Sumanguj,

Hmm... there's nothing in the core script that can do this yet, I'm afraid. You *could* look into the Submission Pre-Parser module to see if you could do some modification of the files prior to adding to the database, but I suspect not.

However, I'll be addressing this very feature in 2.0.5. I haven't made a formal announcement yet, but the plan for that version is to refactor the Form Tools Core along with a "Custom Fields" module. That module will allow for defining your own field types (e.g. phone number fields that are arranged in 3 textboxes, image fields, google maps fields etc). Part of this will include some controls for managing images.

Sorry I couldn't be more help in the meantime.

- Ben


RE: Image upload and resize - sumanguj - Oct 3rd, 2010

that's all right. Really appreciate your formtools. its just amazing although i had a lot of trouble setting it up and running..

i guess we need a lot of examples and update the current examples. they dont seem to work efficiently. the reason why i left to look for other supposedly out of the box working forms but of course got back here after going through the examples and trying and testing Tongue

u rock.