Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 24. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  hidden form vars for specific pages

phpMyEdit Configuration     hidden form vars for specific pages
Odoslať novú tému   Odpovedať na tému    
 
hlslaughter     Založený: 02.07.2003   Príspevky: 12   Bydlisko: San Diego, CA
Príspevok Zaslal: 2003-07-02 21:54
Návrat hore  Odpovedať s citátom     

i want a hidden form var that will be used by a trigger script after an add/update, etc...

i'm using the same trigger script for two different forms that do nearly the same thing.

based on which form they choose, i want to either subtrace or add to a certain number that i insert into the db. i just need to add a hidden field such as:

<input type=hidden name=action value="add">
-- OR --
<input type=hidden name=action value="subtract">

depending on which form the user is submitting.

but using PME, i see no way to insert anything between the <form> tags without modifying the core code.

and i don't need this tag to be in the main page, it just has to be present when the user is about to make a new entry to the table via the "add" button.

there's no documentation for this, but i'm assumming it can be done since it's so basic.

worst case, i was going to check the filename of the form being submitted to determine the action, but that's kinda hacked :) it would also be very hacked to use two different triggers whose only difference is a single operator.

 
nepto     Založený: 06.01.2003   Príspevky: 320   Bydlisko: Phoenix, Arizona (USA)
Príspevok Zaslal: 2003-07-02 23:29
Návrat hore  Odpovedať s citátom     

Well, did you already try $opts['cgi']['persist'] option? Does it satisfy your needs?

 
hlslaughter     Založený: 02.07.2003   Príspevky: 12   Bydlisko: San Diego, CA
Príspevok Zaslal: 2003-07-03 05:20
Návrat hore  Odpovedať s citátom     

yes, i did try that.

i set $opts['cgi']['persist']['myvar'] = "myval"; in the wrapper script. then i tried retrieving the value in the trigger script using:

$myval = $opts['cgi']['persist']['myvar'];

i came up empty.

i haven't used php since v2, so maybe my sytax is off :)

but i've scoured the documentation for a way to do this simple thing, and i've ended up using two separate triggers with duplicate code. it works, but it's very hard for me to accept this ugly solution :)

btw, i think what you've done is very cool. it works very well. it saved me probably several days and allowed me to create an entire web app in an afternoon. my boss is happy. so thanks for developing this.

harry

 
nepto     Založený: 06.01.2003   Príspevky: 320   Bydlisko: Phoenix, Arizona (USA)
Príspevok Zaslal: 2003-07-03 11:34
Návrat hore  Odpovedať s citátom     

Try this, maybe it will work in triggers as well:

$myval = $this->cgi['persist']['myvar'];

I'm glad that my open source product is being used in commercional production environment.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov