Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 20. apríl 2024
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Return to record after error on update/insert

phpMyEdit Configuration     Return to record after error on update/insert
Odoslať novú tému   Odpovedať na tému    
 
BrianJ     Založený: 17.10.2011   Príspevky: 2  
Príspevok Zaslal: 2011-10-17 16:00
Návrat hore  Odpovedať s citátom     

I am trying to return to the data the user was updating/inserting after an error - duplicate entry in a field error. No matter what I try, it always returns to an empty form. I tried using some code I found here to go back, but then I get an error saying the web page has expired, etc. Even if I go ahead and re-post, there is no data. I have a trigger so I can look it up before it gets added, but I still am not sure how to return to the form with the data intact and a message at the top. Any suggestions? Thanks!

Brian.

 
BrianJ     Založený: 17.10.2011   Príspevky: 2  
Príspevok Zaslal: 2011-10-17 16:15
Návrat hore  Odpovedať s citátom     

Ok, so I found another message which partially solved my issue for an update. This thread http://opensource.platon.sk/forum/projects/viewtopic.php?t=60517 shows how to return to a record - the changes have all been lost, but at least it is back to the correct record. It would be great to be able to return to the previous form with the data there for an insert or update.

Brian.

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2011-10-18 14:02
Návrat hore  Odpovedať s citátom     

The following clips may be problematic, I haven't used them much, and may not work in the event Javascript 'required' is true.

Kód:
// view after insert
if($_POST['PME_sys_saveadd'] == 'Save' || $_POST['PME_sys_savechange'] == 'Save' || $_POST['PME_sys_savechange'] == 'Submit'){

   $PME_sys_operation = 'PME_op_View';

   $PME_sys_rec = $_POST['PME_sys_rec'];

   $this->operation = 'View';

}


Kód:
// view after update

$this->rec = $this->key;

$this->operation = $this->labels['View'];

$this->recreate_fdd();

$this->recreate_displayed();


 
itmachines     Založený: 26.07.2012   Príspevky: 1  
Príspevok Zaslal: 2012-07-26 23:53
Návrat hore  Odpovedať s citátom     

Hi,

I was able to acheive this, and as this was not a solution (now in 2012) when was looking for it, I add it here in case some one else comes up with this issue...


In the trigger file, I added the following when the trigger was cancelling the save...

Kód:
if (!$return_value)
{
    //Change view back to change mode...
    $this->operation = $this->labels['Change'];
   
    //This column has different values in list mode,
    // and needed to be set back to a drop down
    // with values from another table
    $this->fdd['product_id']['select'] = 'D';
    $this->fdd['product_id']['values']['table']       = 'products';
    $this->fdd['product_id']['values']['column']      = 'id';
    $this->fdd['product_id']['values']['description'] = 'name';
   
    //This is the column that I re-populated with
    // the previous value, as you see, its simply
    // ignoring the value in the DB, and putting
    // in the posted variable :)
    $this->fdd['size']['sql'] = 'TRIM("'.$newvals['size'].'")';

    $this->recreate_displayed();
}



Hope it helps![/code]

 
viwuvafe     Založený: 27.07.2020   Príspevky: 1  
Príspevok Zaslal: 2020-07-27 11:01
Návrat hore  Odpovedať s citátom     

If you’re a coder and need a platform where people can resolve your queries your bugs, errors, and any other problem. On platoon you can get the solutions of your problem. Here you can get help for your assignment writer australia , Germany, USA or India. They can also help you in your work

 
allassignmentservices     Založený: 20.10.2020   Príspevky: 1  
Príspevok Zaslal: 2020-10-20 12:00
Návrat hore  Odpovedať s citátom     

Financial accounting assignment help comprises of two terms. Financial accounting and assignment help respectively. So, firstly Financial assignment means something related to finance or monetary terms in Layman’s language. Whereas, assignment help means seeking some sort of aid or kind of help to do a given task effectively, efficiently, and in a determined manner.
GETTING SOME DEEP INTO THE CONCEPT
Financial accounting: This is a specific branch of Accounting which comprises of monetary and all financial transactions. This further includes transactions done such as cash flow statements, balance sheets, journals, a theory of the subject, different standards following the theories, tax theories, profit and loss statements, etc. Everything related to finance and securities, assets, and liabilities in any form are recorded here.
Assignment help: This is taking help for completing a given task in a specified time framework.

 
sawijames     Založený: 16.02.2022   Príspevky: 4  
Príspevok Zaslal: 2022-02-16 14:46
Návrat hore  Odpovedať s citátom     

phpMyEdit produces PHP code for showing/altering MySQL tables in HTML. In the same way, on the internet there are a lot of Online news forum those solve this query. So, All you really want to do is to compose a straightforward calling program (a utility to do this is incorporated). It incorporates a gigantic arrangement of table control capacities (record expansion, change, view, duplicate, and evacuation), table arranging, separating, table queries, from there, the sky is the limit.

 
johnclark     Založený: 09.03.2021   Príspevky: 114  
Príspevok Zaslal: 2022-02-17 12:33
Návrat hore  Odpovedať s citátom     

Thanks for the great post you posted. I like the way you describe the unique content. The points you raise are valid and reasonable. I am a tech support expert telling you about.
metamask login
metamask wallet
metamask extesion

 
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