Location: PHPKode > scripts > Noostr > style/default/form.php
<?php defined('SYSPATH') OR die('No direct access to this file is allowed.');

$action = 'new';
$type = $ns->form['type'];

if (isset($formfields['action']) && $formfields['action'] != '') {
	$action = strtolower($formfields['action']);
}

$intro = 'Submit a ';
if ($action == 'edit') {
	$intro = 'Edit this ';
}
if ($ns->form['type'] == 'comment') {
	$intro .= 'comment:';
} else {
	$intro .= 'story:';
}
$parentuid = $ns->story['uid'];
if ($ns->template['parentname'] == 'comment') {
	$parentuid = $ns->comment['uid'];
}
switch ($ns->form['type']) {
	case 'story':
?>
<p class="formintro"><?php echo $intro; ?></p>
<!-- Submission Form -->
<form name="submissionform" id="submissionform" action="/<?php echo $ns->template['page']; ?>" method="post">
	<dl>
		<dt><label for="title">Title:</label></dt>
		<dd><input name="title" id="title" type="text" value="<?php echo $formfields['title']; ?>" /></dd>
		<dt><label for="url">URL:</label></dt>
		<dd><input name="url" id="url" type="text" value="<?php echo $formfields['url']; ?>" /></dd>
		<dd><strong>and / or</strong></dd>
		<dt><label for="content">Text:</label></dt>
		<dd><textarea name="content" id="content"><?php echo $formfields['content']; ?></textarea></dd>
	</dl>
	<input name="type" id="type" type="hidden" value="<?php echo $ns->form['type']; ?>" />
	<input name="action" id="action" type="hidden" value="<?php echo $action; ?>" />
	<input name="node" id="node" type="hidden" value="<?php echo $formfields['node']; ?>" />
	<input name="next" id="next" type="hidden" value="<?php echo $ns->site['referrer']; ?>" />
	<input type="submit" name="submit" id="submit" value="Submit!">
</form>
<!-- // Submission Form -->
<p>Leave URL blank to submit a question for discussion. The Text (if any) will appear at the top of the comments page.</p>
<?php
		break;
	case 'comment':
?>
<!-- Comment Form -->
<form name="commentform" id="commentform" action="/<?php echo $ns->template['pagename']; ?>/thanks" method="post">
	<dl>
		<dt><label for="content"><?php echo $intro; ?></label></dt>
		<dd><textarea name="content" id="content"><?php echo $formfields['content']; ?></textarea></dd>
	</dl>
	<input name="type" id="type" type="hidden" value="<?php echo $ns->form['type']; ?>" />
	<input name="action" id="action" type="hidden" value="<?php echo $action; ?>" />
	<input name="parent" id="parent" type="hidden" value="<?php echo $parentuid; ?>" />
	<input name="node" id="node" type="hidden" value="<?php echo $formfields['node']; ?>" />
	<input name="next" id="next" type="hidden" value="<?php echo $ns->site['referrer']; ?>" />
	<input type="submit" name="submit" id="submit" value="Submit!">
</form>
<!-- // Comment Form -->
<?php
		break;
}
Return current item: Noostr