close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Advice on creating a product update form - image updating, thumbnail creating, text updating

Thread began 3/20/2014 8:42 am by Nathon Jones Web Design | Last modified 3/26/2014 4:40 pm by Nathon Jones Web Design | 1149 views | 30 replies

Nathon Jones Web Design

I am using the Data Assist Upload Record behaviour for the images, am I not? Here's what's inserted on my UPDATE page:

<?php
// WA_UploadResult1 Params Start
$WA_UploadResult1_Params = array();
// WA_UploadResult1_1 Start
$WA_UploadResult1_Params["WA_UploadResult1_1"] = array(
'UploadFolder' => "../led-light-bulbs/tmb/",
'FileName' => "[FileName]",
'DefaultFileName' => "".$row_rsEDITPROD['LEDimgtmb'] ."",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult1_1 End
// WA_UploadResult1 Params End?>
<?php
// WA_UploadResult2 Params Start
$WA_UploadResult2_Params = array();
// WA_UploadResult2_1 Start
$WA_UploadResult2_Params["WA_UploadResult2_1"] = array(
'UploadFolder' => "../led-light-bulbs/meds400/",
'FileName' => "[FileName]",
'DefaultFileName' => "".$row_rsEDITPROD['LEDimg'] ."",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult2_1 End
// WA_UploadResult2 Params End?>
<?php
// WA_UploadResult3 Params Start
$WA_UploadResult3_Params = array();
// WA_UploadResult3_1 Start
$WA_UploadResult3_Params["WA_UploadResult3_1"] = array(
'UploadFolder' => "../led-light-bulbs/meds400/",
'FileName' => "[FileName]",
'DefaultFileName' => "".$row_rsEDITPROD['LEDimg1'] ."",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult3_1 End
// WA_UploadResult3 Params End?>
<?php
// WA_UploadResult4 Params Start
$WA_UploadResult4_Params = array();
// WA_UploadResult4_1 Start
$WA_UploadResult4_Params["WA_UploadResult4_1"] = array(
'UploadFolder' => "../led-light-bulbs/meds400/",
'FileName' => "[FileName]",
'DefaultFileName' => "".$row_rsEDITPROD['LEDimg2'] ."",
'ResizeType' => "0",
'ResizeWidth' => "120",
'ResizeHeight' => "120",
'ResizeFillColor' => "#FFFFFF" );
// WA_UploadResult4_1 End
// WA_UploadResult4 Params End
?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult1", "LEDimgtmb", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult1_Params);
}?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult2");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult2", "LEDimg", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult2_Params);
}?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult3");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult3", "LEDimg1", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult3_Params);
}?>
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult4");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_UploadFiles("WA_UploadResult4", "LEDimg2", "2", "[NewFileName]_[Increment]", "true", $WA_UploadResult4_Params);
}
?>

I have 4 image form fields on the page (imgtmb, img, img1 and img2) and used WebAssist > File Manipulation > Upload to set those up.
In the File Manipulation > Upload Wizard there is an option for "Default file" which I've set, in each instance, to be the matching field from my recordset:

<?php echo $row_rsEDITPROD['LEDimgtmb']; ?>
<?php echo $row_rsEDITPROD['LEDimg']; ?>
<?php echo $row_rsEDITPROD['LEDimg1']; ?>
<?php echo $row_rsEDITPROD['LEDimg2']; ?>

I then added the Update Record server behaviour from the Server Behaviours tab and, it's working for all the other form fields in that it's allowing me to make updates and is saving those to the database, however it is wiping the image fields values as opposed to retaining the "Default file" value.

If I shouldn't be using Server Behaviours > Update Record, or indeed the File Manipulation > Upload, options then how do I access the Data Assist Upload Record behaviour?

The only thing remotely resembling "DataAssist" in my WebAssist menu in DWCC is the option "Database" which has three options:
DataAssist Pages
DataAssist Search Wizard
Repeating Table

Hope you can point me in the right direction. Thank you.
NJ

EDIT:
Just had a look here:
http://www.webassist.com/tutorials/Apply-file-upload-or-download

...and it describes pretty much as I have done. :(
Tell me I haven't come across another glitch, have I!?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...