clonefish logo

loadConfig() method

<?php
  function loadConfig( 
    $filename
  )
?>

A really easy way to configure the layout and other settings for a form: just create a simple .ini textfile, and you're ready to go! Clonefish has a simple built-in parser for .ini files, since the built-in PHP function (parse_ini_file) lacks a few features we would need.

Sample config file:

; layout settings
layout = tabular
layouts.tabular.buttonrow =<tr><td colspan="2"></td><td>%s</td></tr>n
layouts.tabular.element   =<tr %errorstyle%><td width="120" align="rig [...]
layouts.tabular.button    =<input type="submit" value="%s" />

layouts.tabular.container =
  <table cellpadding="5" cellspacing="0" border="0">
  %s
  </table>

Features: