[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem on catching form submition
[Thread Prev] | [Thread Next]
- Subject: Re: Problem on catching form submition
- From: Fabien Bodard <gambas.fr@xxxxxxxxx>
- Date: Tue, 11 Mar 2025 07:40:44 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Well but the post.exist never return the button field because the field is null and request.post seen to work like a collection. An empty field vanish... But in the case of a submit button.. this field must exist. In my Controler class : If fromform then Data modify End View render --+ So I finally use an hidden field to workaround. Le lun. 10 mars 2025 à 22:59, T Lee Davidson <t.lee.davidson@xxxxxxxxx> a écrit : > On 3/10/25 5:57 PM, T Lee Davidson wrote: > > On 3/10/25 5:05 PM, Fabien Bodard wrote: > >> In php normally we can catch if a form if submitted or not by : > >> > >> if (isset($_POST['submit'])) {... > >> > >> But I'm not able to catch any value from the button name :/ via > Request.Post > >> > >> any way to replace that ...? hidden field ? > > > > I assume you are working with gb.web. > > > > You can check for the existence of the button's name in the > Request.Post.Fields array, eg. Request.Post.Exist("button_name"). If > > you need to differentiate between different buttons, simply give them > values. > > I should probably clarify. If the button's name does not exist in the > Fields array, then it was not clicked. > > > -- > Lee > > --- Gambas User List Netiquette [ > https://gambaswiki.org/wiki/doc/netiquette] ---- > --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] > ---- > > >
Re: Problem on catching form submition | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Problem on catching form submition | Fabien Bodard <gambas.fr@xxxxxxxxx> |
Re: Problem on catching form submition | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Re: Problem on catching form submition | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |