PHP Classes

Using Drop-down field

Recommend this page to a friend!

      FTP Writer Class  >  All threads  >  Using Drop-down field  >  (Un) Subscribe thread alerts  
Subject:Using Drop-down field
Summary:How to use a drop-down field in Manuel Lemos' Forms classes
Messages:2
Author:Joe Johnson
Date:2007-04-19 16:00:48
Update:2007-04-19 16:21:59
 

 


  1. Using Drop-down field   Reply   Report abuse  
Picture of Joe Johnson Joe Johnson - 2007-04-19 16:00:48
I'm very new to PHP.

I am thrilled at using Manuel's classes for my forms.

I know rudimentary code such as how to put a drop-down field in a form.

I am having difficulties adding the following code to the samples I downloaded from Manuel's Forms classes.

I want to change this code:

$this->paged_form_object->AddDataPart("<TR>\n<TH ALIGN=right>Facility ID:</TH><TD NOWRAP>");
$this->paged_form_object->AddInputPart("fac_id");
if(IsSet($this->verify["fac_id"]))
$this->paged_form_object->AddDataPart("&nbsp;".$this->verify_field_mark);
$this->paged_form_object->AddDataPart("</TD>\n</TR>\n");

to this:

$this->paged_form_object->AddDataPart("<TR>n<TH ALIGN=right>Facility ID:</TH>
<td nowrap>
<select name="fac_id" id="fac_id" size="1">
<option value="pick" selected="selected">Pick a Facility</option>
<option value="000581">Rehab Hosp SNM</option>
<option value="000582">South TX Rehab</option>
<option value="000583">North Colorado Rehab</option>
<option value="000854">Northern Idaho Advanced Care</option>
<option value="000857">Mt Valley Regional</option>
<option value="000955">Laredo Specialty</option>
<option value="000956">Mesquite Specialty</option>
<option value="000958">Utah Valley Specialty</option>
</select>");
$this->paged_form_object->AddInputPart("fac_id");
if(IsSet($this->verify["fac_id"]))
$this->paged_form_object->AddDataPart("&nbsp;".$this->verify_field_mark);
$this->paged_form_object->AddDataPart("</TD>\n</TR>\n");

I get a parse error: unexpected T_STRING in /usr/local/php_classes/joe_incclass.php on line 324 (which is the line where I tried inserting the code for a drop-down - <td nowrap>).

Any help would be appreciated - even a redirect to a more appropriate forum.

TIA,

jej1216



  2. Re: Using Drop-down field   Reply   Report abuse  
Picture of Joe Johnson Joe Johnson - 2007-04-19 16:21:59 - In reply to message 1 from Joe Johnson
Wrong forum.

My apologies.

jej1216