[phorm] [Phorm:] Re: REQ question

  • From: webbbs@xxxxxxxxx
  • To: support@xxxxxxxxx
  • Date: 23 Feb 2003 03:13:13 -0000

The following new message has been posted on Phorm Support Forum at 
<http://www.phorm.com/support/>. 

*************************************************************************** 

  MESSAGE:  (#2314) Re: REQ question 
            <http://www.phorm.com/support/?rev=2314> 
  AUTHOR:   Patrick O'Hara 
  DATE:     February 22, 2003 at 10:13 p.m. EST 

  Reply To: (#2313) REQ question 
  Author:   Rich 
  Date:     February 22, 2003 at 12:43 p.m. EST 

Hi Rich, 

Yes it can be done. What I understand that want to do is to ensure that there 
is something returned from the database when the user submits the form, and 
that this result is then passed to a hidden field on the ack page (which can 
be a second form if you want). 

Set your config file as per normal for the dbfetch plugin, and in the rules 
file use the following rule. 

REQ ($PHORM_DBFRSLT[NUM]['NAME'] == "") >> non_existant_field >> 1 
No result returned from database 
### 

Explanation: This is a conditional REQ. What it says is, if there is nothing 
in the column name specified of the specified record, then the information in 
a field that does not exist is required. This of course will cause the error, 
as there is nothing in that non-existant field. Please note the quote 
characters in the conditional section. These are required as that is a php 
condition, not a Phorm parsed condition. (like $_GET['foo']) 

On your ack page use {{PHORM_DBFRSLT[NUM][NAME]}} 

In both cases, NUM and NAME should be replaced with the record number and the 
database column name respectively, and >> should be replaced with the tab 
character. 

Hope this helps, 

Patrick O'Hara 
WhitsundayIT 
QLD, Australia 

patrick@xxxxxxxxxxxxxxxx 
www.whitsundayit.com 

*************************************************************************** 

This is an automatically-generated notice.  If you'd like to be removed from 
the mailing list, please visit Phorm Support Forum at 
<http://www.phorm.com/support/>, or send your request to webbbs@xxxxxxxxxx  If 
you wish to respond to this message, please post your response directly to the 
board.  Thank you! 
-------------------------------------------------
You are receiving this message because you are subscribed to the Phorm mailing 
list. To send messages to the mailing list, simply send email to 
phorm@xxxxxxxxxxxxx from the address you have subscribed. You may unsubscribe 
from the list by sending email to phorm-request@xxxxxxxxxxxxx with 
'unsubscribe' in the SUBJECT field.

Other related posts: