SetFieldValue Method    
Navigation: CS File Writer for PHP > Methods >

CalyxFile->SetFieldValue Method 

Sets the Calyx Point® field id value that you request. Method will replace the value of the field id specified or add the field id to the file if it is not already present.

[PHP]
public function SetFieldValue ( $fieldID as integer , $fieldValue as string )

Code Examples

[PHP]

require './CalyxFile.php';

$clxFile = new CalyxFile( 'johnsmith.brw');

$firstName = $clxFile->FieldValue(100);  //Calyx Field ID 100 is the borrower's first name

//Current value for $firstName is "John"

$clxFile->SetFieldValue(100, 'Steve');  //Update the borrower's first name field with a new value

$firstName = $clxFile->FieldValue(100);  //Update our first name variable 

echo $firstName.' '.$lastName;

Returns "Steve Smith"

NOTE:  The value will not be updated permanently until the SaveFile method or the SaveFileWithBackup method is called. 


  Copyright (c) 2010 Cite Systems, Inc.