[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] Trouble with forms
From: |
Brian Johnson |
Subject: |
Re: [Phpgroupware-developers] Trouble with forms |
Date: |
Wed, 14 Aug 2002 17:55:47 +0000 |
Is there a way to bypass that with additional coding?
Maybe check what form was submitted and set the other form's value to it's
original
value?
I'm afraid I don't know how to do this - is it possible?
What about following the forms I put:
if(! $cat_name ) { $cat_name = $category_name; }
if(! $multi1 ) { $multi1 = $multi; }
Chris Weiss (address@hidden) wrote*:
>
>When you have more than one form you can only submit one of them, so the
>field value from the other form is not really set to nul but field simply
>isn't there at all. In the case that you try to change cat_name, an isset
>($multi1) will return false, assuming register_globals is on.
>
>
>Brian Johnson (address@hidden) wrote*:
>>
>>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
>>
>
>
>
>_______________________________________________
>Phpgroupware-developers mailing list
>address@hidden
>http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>
- [Phpgroupware-developers] Trouble with forms, Brian Johnson, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Chris Weiss, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms,
Brian Johnson <=
- Re: [Phpgroupware-developers] Trouble with forms, Chris Weiss, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Brian Johnson, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Chris Weiss, 2002/08/14
- Re: [Phpgroupware-developers] Trouble with forms, Brian Johnson, 2002/08/14