As I mentioned in my report, "It doesn't seem to affect text or
select" so those should be working fine.

Did you also test checkbox?  I didn't include a test for it in that
sample code, but one of my colleagues reported that it was also
affecting them.  You might want to check all of the input types just
to be sure.



On Mon, Nov 5, 2012 at 11:34 AM, Harald Oehlmann
<[email protected]> wrote:
> Am 02.11.2012 21:49, schrieb Jeff Lawson:
>> I think we're seeing a regression in the form package not honoring the
>> default values for textareas and checkbox.  It doesn't seem to affect
>> text or select.  Try the following example:
>>
>>
>>
>>
>> package require form
>>
>> set response(department) "Sales"
>>
>> #parray response
>>
>> form myform  -defaults response -method post
>> myform start
>>
>> puts "<table>"
>> puts "<tr><th>Department:</th><td>"
>> #myform select department -values {Sales Development Operations}
>> #myform text department -size 200
>> myform textarea department -rows 8 -cols 80
>> puts "</td></tr>"
>>
>> myform submit save_tps -value "Save Report"
>>
>> myform end
>> myform destroy
>
> Jeff,
>
> thank you reporting this.
>
> Indeed, textarea was forgotten. It is now corrected in the trunk.
>
> But I don't see the issue with "select".
> Below is your example and my result.
> The corrected "form2.tcl" is attached.
>
> Could you please double-check ?
>
> Thank you,
> Harald
> ---------------------------------------
> Thus, the file:
> --formtest.rvt--
> <html>
> <head /><body>
> <?
> package require form
>
> set response(department) "Development"
>
> #parray response
>
> form myform  -defaults response -method post
> myform start
>
> puts "<table>"
> puts "<tr><th>Department:</th><td>"
> myform select department -values {Sales Development Operations}
> #myform text department -size 200
> #myform textarea department -rows 8 -cols 80
> puts "</td></tr>"
>
> myform submit save_tps -value "Save Report"
>
> myform end
> myform destroy
> ?>
> </body>
> </html>
> --eof--
> returns:
> --html--
> <html>
> <head /><body>
> <form  action="/formtest.rvt" method="post">
> <table>
> <tr><th>Department:</th><td>
> <select name="department" >
> <option value="Sales">Sales</option>
> <option value="Development" selected="selected">Development</option>
> <option value="Operations">Operations</option>
> </select>
> </td></tr>
> <input type="submit" name="save_tps"  value="Save Report" />
> </form>
>
> </body>
> </html>
> --eof--
> a
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to