close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Update form deletes value in file field

Thread began 6/08/2011 5:07 pm by info4753 | Last modified 6/09/2011 12:02 pm by Jason Byrnes | 1053 views | 3 replies |

info4753

Update form deletes value in file field

If I update my form without uploading a new image, the image database file field is being cleared.

I've tried to add the recordset value to the default file field in the Digital File Pro Upload Wizard but that didn't help.

(By the way this option is not documented on dfp_02_01.html).

Thanks for any help in advance.

Attached Files
firmen_update.php.zip
Sign in to reply to this post

info4753

I figured it out. Interesting concept ...

- Add a hidden field
- Bind its value to the database field for the image
- Define the hidden field as the Default file in the Upload behaviour
- Bind the update value for the image field in the Update behaviour to the Server File Name of the Upload Files

:-)

Sign in to reply to this post

iansheldon422428

You dont have to do that.

In the File Upload behaviour there is a default file property on the second page.

Simply bind that to the image field of your recordset.

If there is no change to the file (i.e. a new file is not uploaded) then the upload simply gets ignored and the value stays the same.

This seems to work for me. You dont need the hidden field.

Sign in to reply to this post

Jason ByrnesWebAssist

iansheldon422428:

using the recordset value only works if the forms action passes the URL variable needed to filter the correct record in the recordset. Not all forms will do this.

since you know the URL variable is being passed in when the page loads initially, it is better to use the hidden form element, takes the guess work out of checking the form action to make sure the url variable is passed on submit.

Sign in to reply to this post

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...