forked from jbroadway/form
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added select, radio, checkbox fields, added style-able divs to field …
…html
- Loading branch information
Showing
7 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="form-field form-field-checkbox"> | ||
<div class="form-field-label"> | ||
<label for="{{ id }}">{{ label }}:</label> | ||
<span class="form-notice" id="form-{{ id }}-notice">{{ message }}</span> | ||
</div> | ||
<div class="form-field-input"> | ||
{% foreach values %} | ||
<div> | ||
<input type="checkbox" name="{{ id }}[]" value="{{ loop_value }}"{% if loop_value == $data->default %} checked="checked"{% end %} /> | ||
<span>{{ loop_value }}</span> | ||
</div> | ||
{% end %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="form-field form-field-radio"> | ||
<div class="form-field-label"> | ||
<label for="{{ id }}">{{ label }}:</label> | ||
<span class="form-notice" id="form-{{ id }}-notice">{{ message }}</span> | ||
</div> | ||
<div class="form-field-input"> | ||
{% foreach values %} | ||
<div> | ||
<input type="radio" name="{{ id }}" value="{{ loop_value }}"{% if loop_value == $data->default %} checked="checked"{% end %} /> | ||
<span>{{ loop_value }}</span> | ||
</div> | ||
{% end %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="form-field form-field-select"> | ||
<div class="form-field-label"> | ||
<label for="{{ id }}">{{ label }}:</label> | ||
<span class="form-notice" id="form-{{ id }}-notice">{{ message }}</span> | ||
</div> | ||
<div class="form-field-input"> | ||
<select name="{{ id }}" value="{{ default }}" placeholder="{{ placeholder }}"> | ||
<option value="">- {" Choose "} -</option> | ||
{% foreach values %} | ||
<option value="{{ loop_value }}"{% if loop_value == $data->default %} selected="selected"{% end %}>{{ loop_value }}</option> | ||
{% end %} | ||
</select> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<p>{{ label }}:<br /> | ||
<input type="text" name="{{ id }}" size="{{ size }}" value="{{ default }}" placeholder="{{ placeholder }}" /> | ||
<span class="form-notice" id="form-{{ id }}-notice">{{ message }}</span></p> | ||
<div class="form-field form-field-text"> | ||
<div class="form-field-label"> | ||
<label for="{{ id }}">{{ label }}:</label> | ||
<span class="form-notice" id="form-{{ id }}-notice">{{ message }}</span> | ||
</div> | ||
<div class="form-field-input"> | ||
<input type="text" name="{{ id }}" size="{{ size }}" value="{{ default }}" placeholder="{{ placeholder }}" /> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<p>{{ label }}: <span class="form-notice" id="form-{{ id }}-notice">{{ message }}</span><br /> | ||
<textarea name="{{ id }}" cols="{{ cols }}" rows="{{ rows }}" placeholder="{{ placeholder }}">{{ default }}</textarea> | ||
</p> | ||
<div class="form-field form-field-textarea"> | ||
<div class="form-field-label"> | ||
<label for="{{ id }}">{{ label }}:</label> | ||
<span class="form-notice" id="form-{{ id }}-notice">{{ message }}</span> | ||
</div> | ||
<div class="form-field-input"> | ||
<textarea name="{{ id }}" cols="{{ cols }}" rows="{{ rows }}" placeholder="{{ placeholder }}">{{ default }}</textarea> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
<p><input type="submit" value="{" Submit "}" /></p> | ||
<div class="form-field form-field-submit"> | ||
<div class="form-field-input"> | ||
<input type="submit" value="{" Submit "}" /> | ||
</div> | ||
</div> | ||
</form> |