Date: 08/23/00
- Next message: J.Skowyra <email protected>: "[phplib] insert problem"
- Previous message: J.Skowyra <email protected>: "[phplib] 3 is not a MySQL link index in db_mysql.inc on line 100 (fwd)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Hellekin O. Wolf" wrote:
> Hello,
>
> following my previous post about oohforms,
> I fixed my problem by changing the self_get_frozen() method in
> of_text.inc
>
> The $val variable passed as the first parameter was not taken into
> account !
> Moreover, the string returned was included in a table.
> It now returns the hidden field + the raw value, letting you take care
> of how it is displayed.
>
> This applies to phplib7.2b
>
> Enjoy,
>
> hellekin.
>
> function self_get_frozen($val,$which, &$count) {
> // I didn't test this part, as the element should be
> // a "text" element, hence a string...
>
In the manual,
show_element($name,$value)
[...] For other elements that may be array valued (notably text elements)
multiple calls to show_element will show successive
values.
> if (is_array($val))
> $val = $val[$which];
>
> $n = $this->name . ($this->multiple ? "[]" : "");
>
> $str = "<input type='hidden' name='$n' value='$val'>\n $val\n";
>
> $count = 1;
> return $str;
> }
This is the same with self_get().
in of_text.inc
function self_get($val,$which, &$count) {
$str = "";
if (is_array($val))
$v = htmlspecialchars($val[$which]);
else
$v = htmlspecialchars($val);
$n = $this->name . ($this->multiple ? "[]" : "");
$str .= "<input name='$n' value=\"$v\"";
$str .= ($this->pass)? " type='password'" : " type='text'";
if ($this->maxlength)
$str .= " maxlength='$this->maxlength'";
if ($this->size)
$str .= " size='$this->size'";
if ($this->extrahtml)
$str .= " $this->extrahtml";
$str .= ">";
$count = 1;
return $str;
}
It seems there is the same problem in of_textarea. Did anybody use
show_element($name,$not_null_value) for a textarea ?
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: J.Skowyra <email protected>: "[phplib] insert problem"
- Previous message: J.Skowyra <email protected>: "[phplib] 3 is not a MySQL link index in db_mysql.inc on line 100 (fwd)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

