Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction for prefilling text inputs #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions materializecssform/templates/materializecssform/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
{% endif %}

<input type="text" id="{{ field.auto_id }}" name="{{ field.html_name }}" class="datepicker" value="{% if field.value %}{% localize off %}{{ field.value }}{% endlocalize %}{% endif %}" {% include 'materializecssform/attrs.html' %} >
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
<label for="{{ field.id_for_label }}"{% if field.value %} class="active"{% endif %}>{{ field.label }}</label>

{% for error in field.errors %}
<span class="help-block {{ form.error_css_class }}">{{ error }}</span>
Expand All @@ -75,7 +75,7 @@
{% endif %}

<input type="datetime-local" id="{{ field.auto_id }}" name="{{ field.html_name }}" value="{% if field.value %}{{ field.value|date:'c' }}{% endif %}" {% include 'materializecssform/attrs.html' %} >
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
<label for="{{ field.id_for_label }}"{% if field.value %} class="active"{% endif %}>{{ field.label }}</label>

{% for error in field.errors %}
<span class="help-block {{ form.error_css_class }}">{{ error }}</span>
Expand Down Expand Up @@ -180,7 +180,7 @@
{% endif %}
<textarea id="{{ field.auto_id }}" class="materialize-textarea" name="{{field.html_name}}" {% include 'materializecssform/attrs.html' %} >{% if field.value %}{{ field.value }}{% endif %}</textarea>
{% if field.auto_id %}
<label class="{% if field.field.required %}{{ form.required_css_class }}{% endif %}" for="{{ field.auto_id }}">{{ field.label }}</label>
<label class="{% if field.field.required %}{{ form.required_css_class }}{% endif %}{% if field.value %} active{% endif %}" for="{{ field.auto_id }}">{{ field.label }}</label>
{% endif %}

{% for error in field.errors %}
Expand Down Expand Up @@ -223,7 +223,7 @@
{% endif %}
{{ field }}
{% if field.auto_id %}
<label class="{% if field.field.required %}{{ form.required_css_class }}{% endif %}" for="{{ field.auto_id }}">{{ field.label }}</label>
<label class="{% if field.field.required %}{{ form.required_css_class }}{% endif %}{% if field.value %} active{% endif %}" for="{{ field.auto_id }}">{{ field.label }}</label>
{% endif %}

{% for error in field.errors %}
Expand Down