Skip to content

Instantly share code, notes, and snippets.

@kylejohnson
Created May 5, 2013 16:10
Show Gist options
  • Select an option

  • Save kylejohnson/5521261 to your computer and use it in GitHub Desktop.

Select an option

Save kylejohnson/5521261 to your computer and use it in GitHub Desktop.
Array
(
[Config] => Array
(
[0] => Array
(
[ZM_TIMESTAMP_ON_CAPTURE] => 1
[id] =>
)
[1] => Array
(
[ZM_CPU_EXTENSIONS] => 1
[id] =>
)
[2] => Array
(
[ZM_FAST_IMAGE_BLENDS] => 1
[id] =>
)
<h2>Configs</h2>
<?php
echo $this->Form->create('Config', array(
'url' => '/config/edit'
));
foreach ($configs as $index => $config):
$inputname = 'Config.' . $index . '.' . $config['Config']['Name'];
echo $this->Form->input($inputname, array(
'default' => $config['Config']['Value'],
'label' => $config['Config']['Name'],
'after' => $config['Config']['Prompt'],
));
echo $this->Form->input( "Config." . $index . '.id', array('type' => 'hidden'));
endforeach;
unset($config);
echo $this->Form->end('Save Config');
?>
</table>
<div class="input text">
<label for="Config0ZMTIMESTAMPONCAPTURE">ZM_TIMESTAMP_ON_CAPTURE</label>
<input id="Config0ZMTIMESTAMPONCAPTURE" type="text" value="1" name="data[Config][0][ZM_TIMESTAMP_ON_CAPTURE]">
Timestamp images as soon as they are captured
</div>
<input id="Config0Id" type="hidden" name="data[Config][0][id]">
<div class="input text">
<label for="Config1ZMCPUEXTENSIONS">ZM_CPU_EXTENSIONS</label>
<input id="Config1ZMCPUEXTENSIONS" type="text" value="1" name="data[Config][1][ZM_CPU_EXTENSIONS]">
Use advanced CPU extensions to increase performance
</div>
<input id="Config1Id" type="hidden" name="data[Config][1][id]">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment