Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Need some help defaulting a field on insert

phpMyEdit General     Need some help defaulting a field on insert
Odoslať novú tému   Odpovedať na tému    
 
wwday3     Založený: 11.04.2011   Príspevky: 2  
Príspevok Zaslal: 2011-04-11 06:07
Návrat hore  Odpovedať s citátom     

Runner ID is the field.

Originally, I thought making the field hidden and just defaulting the value would work. It did not.

Kód:

$opts['fdd']['RunnerID'] = array(
  'options'  => 'H',
  'default'  => $user,
);


I noted that in the generated form RunnerID was not found, even as a hidden input field. I figured that was the issue. So, I then tried

Kód:

$opts['cgi']['persist'] = array('RunnerID' => $user);


Which added RunnerID to the form as a hidden field. However, when Add was clicked, the value was not populated in the table. So, I added

Kód:

$opts['cgi']['overwrite']['RunnerID'] = $user;


Same result. The hidden form field RunnerID is populated, but for whatever reason it is not added to the SQL insert operation (I haven't even messed with change/update yet).

After reading similar posts on the forum I also tried

Kód:

$opts['fdd']['RunnerID'] = array(
  'options'  => 'R',
  'default'  => $user,
);


still with no positive results.

I really don't think it should be necessary to use an include file, especially for each separate operation for each database file.

Is there a way to do this that works? Do I have some sort of CGI restrictions I should look at?

 
wwday3     Založený: 11.04.2011   Príspevky: 2  
Príspevok Zaslal: 2011-04-11 07:29
Návrat hore  Odpovedať s citátom     

Ha! I finally got it to work. I used the following:

Kód:

$opts['fdd']['RunnerID'] = array(
  'options'  => 'HAP',
  'default'  => $user
);


It was the HAP that made it work (without sqlw - which didn't work on its own, or the cgi-overwrite, which also didn't work on its own)

So, now I'm HAPpy :)

 
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