AnsweredAssumed Answered

Filemaker API PHP getValueListTwoFields() bug?

Question asked by alagu123 on Aug 28, 2012
Latest reply on Aug 29, 2012 by alagu123

Hi

 

I want to show the Filemaker database Value list fields in my PHP text box.

 

Its a two value fields and I am using Filemaker 11. So for that I use getValueListTwoFields like below as per Filemaker API PHP documentation.

 

But it shows only one value. second value come as array index value.

 

Please suggest me.

 

 

The Text box name (but drop down list) is 'No'. So For example, it shows the values

 

101 William

102 John

 

ValueList Name is YourDetails.

 

The sample code what I use is,

 

<tr>

<td>

<?php $fieldName = 'No';?><?php $fieldValue = $record->getField('No', 0) ; ?>

 

<?php $menuOptions = $layout->getValueListTwoFields("YourDetails", $record->getRecordId());

 

 

$valueList = '<select name="valueList">';

foreach ($menuOptions as $displayedValue => $value)

 

{

 

$valueList .= '<option value="' . $value . $displayedValue. '">' . $value . " ". $displayedValue . " ". '</option>';

 

}

$valueList .= '<select>';

echo $valueList;

 

?>

 

 

</td>

 

</tr>

 

 

 

The Result what I get is,

 

101 0

102 1

 

but it need to be

 

101 William

102 John

Outcomes