phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Trouble with forms


From: Bob Schader
Subject: Re: [Phpgroupware-developers] Trouble with forms
Date: Wed, 14 Aug 2002 18:14:45 -0400

Brian,

Just make both input boxes do a submit like the current one does I would think.
If people tab between them it should be no problem. Even if they hit return,
I would also think it not a problem IF the form processing code at the beginning
of the admin page is modified properly. I'm stating this from memory though,
so I suppose I could be wrong. But I see no need for 2 forms or a submit button
in this case.

Bob Schader

----- Original Message ----- 
From: "Brian Johnson" <address@hidden>
To: <address@hidden>
Sent: Wednesday, August 14, 2002 11:45 AM
Subject: [Phpgroupware-developers] Trouble with forms


> I'm trying to add a field to the catagory table in the timetrack module and am
> having trouble figuring out the form to edit the catagories under the admin 
> module
> 
> Currently, it allows you to edit the catagory name in an input box and hit 
> enter to
> submit it.  I would like to be able to edit the two fields in the same manner.
> 
> I need two forms (each one with one input box) or I need a submit button - 
> tell me
> if I'm wrong on this
> 
> I have:
> 
>           echo '<form method=POST action="'
>              . $GLOBALS['phpgw']->link("/timetrack/admin3.php","cat_id=" .
> $catagory_id . "&mode=accept")             . '">';
>           echo '<td><input name="cat_name" value="' . $catagory_name . 
> '"></td>';
>           echo '</form>';
>           echo '<form method=POST action="'
>              . $GLOBALS['phpgw']->link("/timetrack/admin3.php","cat_id=" .
> $catagory_id . "&mode=accept")             . '">';
>           echo '<td><input name="multi1" value="' . $multi . '"></td>';
>           echo '</form>';
> 
>           $GLOBALS['phpgw']->db->query("update phpgw_ttrack_wk_cat set
> catagory_desc='$cat_name' "
>             . ", billout_multiplier='$multi1' where 
> work_catagory_id='$cat_id'");
> 
> 
> It defaults to display the current values properly, but if I hit enter in one 
> box
> (accept on one form),  the value of the other input box is set to null - not 
> the
> default value
> 
> Otherwise, it works as expected (the edited value is changed properly).
> 
> How can I make coding to get the second input box to not reset the current 
> value?
> 
> PS - yes I know catagory is spelt incorrectly
> 
> 
> 
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 8/3/2002





reply via email to

[Prev in Thread] Current Thread [Next in Thread]