This was done purely as an example as to how to do inline forms in CMS Made Simple. of course things can get more complex.... but what it illustrates is that CMS Made Simple does not prevent you from coding your own forms, etc.
Notice I did not use a UDT. I did the code inline (remember to set the use_smarty_php_tags variable to true in the config.php).
Code: Select all
{php}
$count = 5;
if( isset( $_REQUEST['submit'] ) )
{
if( isset( $_REQUEST['count'] ) ) {
$square = (float) $_REQUEST['count'];
$square = $square * $square;
echo "The Result is: $square<br/>";
}
}
{/php}
<form method="post" action="{$smarty.server.PHP_SELF}">
<label for="count">Count</label>:
<input name="count" type="text" maxlength="10" length="10" value="{php}echo $count;{/php}">
<input type="submit" name="submit" value="Go">
</form>