Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8022 Posts in 1850 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: forcing input type  (Read 457 times)
0 Members and 1 Guest are viewing this topic.
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 07, 2007, 06:29:00 PM »

to make a long story short, i am coding a combobox that can be used in when adding/editing events.  Due to the nature of this new code, i need to take the following calendarscript code...

<%= &main::GetFieldInput($db->{'properties'}->{$field},$field,$record) %>

and force it to be INPUT TYPE="text" regardless of what it was originally.  but its not working out for me

Logged
beneath_the_ashes
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #1 on: March 07, 2007, 06:57:00 PM »

this might help clarify things...
code:

<%-- code taken from add_edit_events.html tempalte --%>
<%
$fieldnames = &main: BGetAddFields($db);
foreach $field (@$fieldnames) {
%>
<TR>

<%-- SHOULD check to see if input field is a 'select' type --%>
<% if (&main::GetFieldInput($db->{'properties'}->{$field},$field eq "select") { %>
   <TD ALIGN="RIGHT"><B><%= $db->{'properties'}->{$field}->{'name'} | | $field %> : </B></TD>
<%-- if it is a select field, it SHOULD dispaly that field value in a textbox instead of the select field --%>
   <TD><INPUT TYPE="text" NAME="FIELD_state" SIZE="30" MAXLENGTH="2" VALUE="<%= $db->{'properties'}->{$field}->{'name'} | | $record %>" ></TD>
<%-- otherwise it SHOULD just display it normally --%>
<% } else { %>
   <TD ALIGN="RIGHT"><B><%= $db->{'properties'}->{$field}->{'name'} | | $field %> : </B></TD>
   <TD><%= &main::GetFieldInput($db->{'properties'}->{$field},$field,$record) %></TD>
<% } %>

</TR>
<% } %>


------------------

Logged
Pages: [1]   Go Up
Print
Jump to: