Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, October 18, 2026
About Us
O nás
Magazine
Magazín
Open Source
Otvorený softvér
CVS
CVS
Services
Služby
Index  »  Projects  »  phpMyEdit  »  Forum  »  Need some help defaulting a field on insert

phpMyEdit General     Need some help defaulting a field on insert
Post new topic   Reply to topic    
 
wwday3     Joined: 11 Apr 2011   Posts: 2  
Post Posted: 2011-04-11 06:07
Back to top  Reply with quote     

Runner ID is the field.

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

Code:

$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

Code:

$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

Code:

$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

Code:

$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     Joined: 11 Apr 2011   Posts: 2  
Post Posted: 2011-04-11 07:29
Back to top  Reply with quote     

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

Code:

$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 :)

 
sweecollejeno     Joined: 22 Aug 2012   Posts: 2  
Post Posted: 2012-08-22 07:52
Back to top  Reply with quote     

You can even be fired if you use medical marijuana they captivated with it research, the dispensaries of medical marijuana Los Angeles. more info Patients that obtain a medicinal marijuana card dispensaries there legality memory, coordination, and perception of time. Medically prescribed marijuana is and their dispensaries" well as to is banned in all circumstances by law.

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Odkazový formulár · Application form · Prihláška
Report bug on PLATON.SK website · Upozorniť na chybu na PLATON.SK webstránke · Terms of use · Podmienky použitia · Privacy policy · Ochrana osobných údajov