{% extends 'base.html' %} {% block content %}
{% set footer %} {% endset %} {% call widget.gcard(title='Save field', class='col-md-3', footer=footer) %} {{ widget.gform('form_field_reff_fields', form, ['name', 'title', 'type', 'weight', 'choiced', 'required'], extra={'choiced':'
'}) }} {% endcall %} {% call widget.gcard(title=field_reff_fields.name + ' field collections', class='col-md-9', body_class='p-0') %} {% if field_reff_fields.form_reference_fields|length > 0 %} {% for formfields in field_reff_fields.form_reference_fields %} {% endfor %} {% else %} {% endif %}
# Name Title Type Weight Required Created by Action
{{ formfields.id }} {{ formfields.name }} {{ formfields.title }} {{ formfields.type }} {{ formfields.weight }} {{ formfields.required }} {{ field_reff_fields.user.username }}
No fields found yet.
{% endcall %}
{% endblock %} {% block javascript %} var choiced_textarea = $('textarea[name="choiced"]'); choiced_textarea.hide() if($('#type').val() == 'SelectField' || $('#type').val() == 'SelectMultipleField') { $('.choiced').show(); } else { $('.choiced').hide(); } $('#type').bind('change', function() { if(this.value == 'SelectField' || this.value == 'SelectMultipleField') { $('.choiced').show(); } else { $('.choiced').hide(); } return false; }); var choiced_editor = ace.edit('choiced-editor'); choiced_editor.setValue(choiced_textarea.val()); choiced_editor.getSession().on('change', function(){ choiced_textarea.val(choiced_editor.getSession().getValue()); }); {% endblock %}