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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

adding default value and toggling fields to accept data dependant on another fields data

Thread began 9/18/2015 7:55 am by software.current355386 | Last modified 9/24/2015 1:24 am by Ray Borduin | 401 views | 7 replies |

software.current355386

adding default value and toggling fields to accept data dependant on another fields data

generated dataassist database file would like to add 777 as the default value to height and width fields
nb database inserts 777 but thee form puts in 0 ts why i am looking at setting default ???


aslo what i would like to do if possible is if AREAID is <> FREE then SCREENID = FREE and visa versa on INSERT and UPDATE pages

Attached Files
testimonials_insert.php
Sign in to reply to this post

Ray BorduinWebAssist

It looks like the height and width columns are being set from fields in the form. You have lists for both AreaID and ScreenID fields. Are you saying one of the two always has to be "Free"? How many other options are there in the lists?

Sign in to reply to this post

software.current355386

height and width in the form are override to the default values set in database, when add record with these empty in the form,0 is put into database not the default value.

the list could have 30 entries in each i know the value of FREE in both case so was hoping to put these into approiate fields

Sign in to reply to this post

Ray BorduinWebAssist

You can put the default value in with the binding for the field.

Right now for instance the width is set to: <?php echo((isset($_POST["TestimonialImgWidth"]))?$_POST["TestimonialImgWidth"]:""); ?>

Instead set it to: <?php echo((isset($_POST["TestimonialImgWidth"]) && $_POST["TestimonialImgWidth"] != "")?$_POST["TestimonialImgWidth"]:"777"); ?>

Then it will set the value to 777 when it is left blank.

I still don't quite understand the FREE scenario. You have fields to set those values. When would they be used? When would they be ignored and use the FREE value?

Sign in to reply to this post

software.current355386

FREE has a value of 999 so what am trying achieve is that only 1 of rge fieds can contain999

Sign in to reply to this post

software.current355386

cannot find the statement you indicated

Sign in to reply to this post

Ray BorduinWebAssist

Double click on the insert record server behavior to open it and then go to the bindings tab and click on the Width column. That is where you would make the change.

What would the result be if they tried to insert FREE for both? No insert takes place and you display an error message?

Sign in to reply to this post

software.current355386

someone pointe out an easier solution and it woks, thanks for help

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