close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Show Region

Thread began 1/09/2022 11:17 am by birdscreen398247 | Last modified 1/09/2022 2:21 pm by Ray Borduin | 147 views | 1 replies |

birdscreen398247

Show Region

I want to show or hide two fields based on a SecurityAssist rule.

I want batchdate (a Select box) to show if $rsDecisions->getColumnVal("batch_date" is null or blank.
(batch_date_select_hide)

I want batch_date (a readonly text field) to show if $rsDecisions->getColumnVal("batch_date" has data.
(batch_date_show)


The rules I set up are:

case "batch_date_select_hide":
$comparisons[0] = array(TRUE, "".($rsDecisions->getColumnVal("batch_date")) ."", 1, "\"\"");
break;
case "batch_date_show":
$comparisons[0] = array(TRUE, "".($rsDecisions->getColumnVal("batch_date")) ."", 5, "01/01/1901");
break;

The fields on the form are:

<p style="margin-left: 20pt;text-indent: 0pt;text-align: left;">
<?php if(WA_Auth_RulePasses("batch_date_select_hide")){ // Begin Show Region ?>
<select name="batchdate" class="TextBox" id="batchdate" >
<?php
while(!$rsBatchDates->atEnd()) { //dyn select
?>
<option value="<?php echo($rsBatchDates->getColumnVal("Batch_Date")); ?>"<?php if (!(strcmp($rsBatchDates->getColumnVal("Batch_Date"), ($rsBatchDates->getColumnVal("Batch_Date"))))) {echo "selected=\"selected\"";} ?>><?php echo($rsBatchDates->getColumnVal("Batch_Date")); ?></option>
<?php
$rsBatchDates->moveNext();
} //dyn select
$rsBatchDates->moveFirst();
?>
</select>
<?php } // End Show Region ?>

<?php if(WA_Auth_RulePasses("batch_date_show")){ // Begin Show Region ?>
<input name="batch_date" type="text" id="batch_date" value="<?php echo($rsDecisions->getColumnVal("batch_date")); ?>" readonly/>
<?php } // End Show Region ?>
</p>


When I run the page. Neither field shows up and everything else on the page below that code is not displayed.

Please help.

Frank

Sign in to reply to this post

Ray BorduinWebAssist

You can't do security assist rules based on recordset values.

Use the server behavior "webassist" -> "Utilities" -> "Show Region Utility"

That will allow you to do a show if based on a recordset value on the page.

Sign in to reply to this post
Did this help? Tips are appreciated...

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