Login Retreive lost passwordRegister
Search

Forum Index / Feedback / SetFieldViewMode bug

[ This topic is solved ]

  Vincent Kleijnendorst 02 September 09 / 11:56  
Hi,

When a field is set to read-only with setFieldViewMode, the $aData array in the OnCorrect function contains the field as array key with an empty value.

When setFieldViewMode is used, there is no POST for this field. Therefor the data array should not contain the array key.

  Johan Wiegel (Admin) 02 September 09 / 14:37  
That depends on your point of view to this bug/feature

<?php

function doRun$aData )
{
    
print_r$aData );
}

include(
"includes/FH3/class.FormHandler.php");

$form = new FormHandler('addCustomer');
$dimValue 'test';
$form->setValue('dim'$dimValuetrue);
$form->textField('Titel''titel');

$form->textField('Dimensie''dim');
$form->setFieldViewMode('dim'true);
$form->OnCorrect'doRun' );
$form->submitButton("Opslaan");
$form->Flush();
?>


gives me:Array ( [titel] => [dim] => test )

exactly what I want it to be. The field is in viewmode, the user can not change it, but is should be posted. If there is no value, the field is still in the form, just not to be altered by the user

  Top


powered by PHP-GLOBE   © 2004 - 2010 FormHandler. All rights reserved.   -   Open source license