<style type="text/css"> #data_searcher { margin: 10px 0; padding: 5px; background-color: #FFFE73; border: 1px solid #FFA573; } #data_search { width: 50%; } #data_search, #col_names { padding: 2px; margin: 3px; } #more_options { margin: 5px 0 0; display: none; } </style> <h2>"<?php echo $form->name; ?> " Data</h2> <p><?php echo anchor(nice_form_uri('forms/fill/', $form->id, $form->name), "Go to form", 'title="View the form"'); ?> </p> <form id="data_searcher" method="GET"> <label for="data_search">Search for </label> <input type="text" name="data_search" id="data_search" value="" /> <label for="col_names">in </label> <select id="col_names" name="col_names"> <option value="-1" selected="selected">All fields</option> <?php foreach ($form->fields as $index => $field) { ?> <option value=".col<?php echo $index; ?>
Form</h2> <?php echo form_open('', 'id="create_form"'); ?> <?php if (isset($success) && $success) { ?> <p id="success_msg">Edit successful!</p> <?php } ?> <?php if ($action == Admin::EDIT) { ?> <?php echo anchor(nice_form_uri('forms/fill/', $form_id, $form_name), 'Go to form', 'title="View the form"'); ?> <?php } ?> <div class="field editingField"> <label class="field_label" for="name">Form Name</label> <?php echo form_error('name'); ?> <input id="name" type="text" name="name" size="50" value="<?php echo set_value('name'); ?> " />
<span class="last_mod">Last modified: <?php echo date('M d, Y', $form->time_created); ?> </span> <div class="form_info"> <?php /* If this is an admin, it'll allow for editing and viewing data of filled out forms */ ?> <?php if ($this->session->userdata('admin')) { ?> <?php echo anchor(nice_form_uri('admin/edit/', $form->id, $form->name), 'edit', 'title="Edit the form"'); ?> <?php echo anchor(nice_form_uri('admin/data/', $form->id, $form->name), 'data', 'title="View form responses"'); ?> <?php } ?> </div> </li> <?php } ?> <?php } /* In case no forms are found */ } else {
<p>You've successfully created a form! </p> <p> Click <?php echo anchor(nice_form_uri('forms/fill/', $form_id, $form_name), 'here'); ?> to view the form. Click <?php echo anchor(nice_form_uri('admin/edit/', $form_id, $form_name), 'here'); ?> to edit it. </p>