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

Handling checkbox on the detail and update pages of webassist

Thread began 10/01/2009 7:43 am by neil.batchelor254136 | Last modified 10/06/2009 6:54 pm by Eric Mittman | 1047 views | 3 replies |

neil.batchelor254136

Handling checkbox on the detail and update pages of webassist

When you create an insert page you can choose checkbox and the checkbox data input I have chosen is:

1 for checked
0 for unchecked

After insert a record the detail page with display all the checkbox entries as 1s.

1. How can I display these 1s as Yes.
Please explain step by step and as simply as possible because my php knowledge it still growing.

2. On selected update all my checkbox are blank, i.e. no ticks, even through I inserted them.
If a checkbox = 1 on insert how do I get this to display on the update page as a tick when the record is requested.
Again, lease explain step by step and as simply as possible because my php knowledge it still growing.

Many thanks,
Neil

Sign in to reply to this post

Eric Mittman

I will do my best to explain it here for you.

Checkboxes will contain the value of whatever you specify in the value attribute, but only if the box is checked. So if you have the value of the checkbox be 1 that form element will have a value of 1 if it is checked.

If the '1' is the value from the checkbox you can get it to say yes if update the value of the checkbox to be yes on the insert and update pages.

You can also make this change in the code directly using a ternary expression like this:

php:
<?php echo ($row_YourRS['the column'] == '1')?'Yes':'No' ?>



This is equivalent to saying if the column from the recordset is equal to 1 then write yes, otherwise write no.

I edited this post to add in the part about showing the default value. To do this select the checkbox then in the properties panel click on the dynamic (lightning bolt) button. In here you can specify to have the box checked if a certain value is present.

If this is not enough info to help you get it worked out please post back and include some more details about how far you have gotten in these steps and what the result is. It may also be helpful to post back with the pages in a zip archive so that they can be examined.

Sign in to reply to this post

neil.batchelor254136

Thanks

Eric thanks this worked.

Can you take at my latest query please.
I don't understand at all how to retrieve the records unique to a logged in user:

showthread.php?t=3489&page=2

Thanks again Neil
(this is an urgent query please.

Sign in to reply to this post

Eric Mittman

The thread you posted looks a little busy so I will try to get you some info here. If the thread has gone too far off topic it may be best to start a new thread and just reference anything that you need to.

The idea is like this, when a user logs in you can store any value from that users record in a session variable with Security Assist. It is common to store the id in a session variable. Assuming that your login is setup like this you can retrieve any info about that user on any page by using the session variable.

With the userID session variable present on any page you would like to get the details for that user you would just create a recordset in Dreamweaver. In this recordset just choose the user's table and all the column. In the filter section you will just specify to filter on the userID column, with a session variable, then enter the name of your session variable that holds the userID. If you need to look it up you can find it in the authenticate user server behavior on the user login page.

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