Gossamer Forum
Home : Products : DBMan : Customization :

~ s/\n/<BR>/g; vs. "hidden"

Quote Reply
~ s/\n/<BR>/g; vs. "hidden"
My basic question is whether it is possilbe to use ~ s/\n/<BR>/g; with
input type="hidden" and $rec{'Comentarios Uno'} in order to have one or more fields in a record show in a record to be modified as read only, but still maintain all formatting. When I tried my solution I got part of the hidden input as well as the part I wanted printed with $rec{'Comentarios Uno'}.

Here's the situation: I recently set up DBman as a means for two classrooms to complete the "writer's process" together. This means that students post stories and then do distance conferencing to give feedback, write a second draft, conference again, then post a final draft.

In order to make things clear for elementary school students, I put in a series of elsif statements in sub html_record_form_cuno which is called up for modifying. The students only see the last two steps in the process instead of the entire record and I used input="hidden" so that they couldn't change other students work (see below).

My problem is that if I add $rec{'Comentarios Uno'} =~ s/\n/<BR>/g; to the already existing $rec{'Borrador Uno'} =~ s/\n/<BR>/g; at the top of this subroutine, I get a fragment of the "hidden" field showing, from the first <BR>, as well as the part that I wanted printed. It seems like the $rec{'Comentarios Uno'} =~ s/\n/<BR>/g; is "forcing" part of the hidden input to print. How can I get around this?

Thanks for any and all advice.

Here is an example (field names are in Spanish):

elsif ($rec{'Nombre'} && $rec{'Título'} && $rec{'Borrador Uno'} && $rec{'Comentarios Uno'})

{
print qq|
<input type="hidden" NAME="Key" VALUE="$rec{'Key'}">
<input type=hidden name="Teacher" VALUE="$rec{'Teacher'}">
<input type="hidden" NAME="Nombre" VALUE="$rec{'Nombre'}">
<input type="hidden" NAME="Título" VALUE="$rec{'Título'}">
<input type="hidden" NAME="Borrador Uno" VALUE="$rec{'Borrador Uno'}">
<input type="hidden" NAME="Comentarios Uno" VALUE="$rec{'Comentarios Uno'}">
<input type="hidden" NAME="Par Uno" VALUE="$rec{'Par Uno'}">



<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Nombre:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Nombre'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>T&iacute;tulo:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Título'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Borrador Uno:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Borrador Uno'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Comentarios Uno:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Comentarios Uno'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Par Uno:</FONT></TD>


<TD WIDTH="80%">&nbsp;<$font>$rec{'Par Uno'}</font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Borrador Dos:</FONT></TD>
<TD VALIGN="TOP" WIDTH="80%">&nbsp;<TEXTAREA NAME="Borrador Dos" cols=90 rows=15 wrap=virtual" MAXLENGTH="10000" VALUE="$rec{'Borrador Dos'}"></TEXTAREA></TD></TR>


|;
}
Charlie Bauer

ELL / Migrant Education Coordinator
Southern Oregon Education Service District