<commit_before>{# ==========================================================================

   form_field_with_button.render()

   ==========================================================================

   Description:

   Creates a form field with text when given:

   value:  An object used to customize the markup.

   value.btn_text:          The text for the submit button.

   value.field.required:    Boolean indicating whether the field is required.

   value.field.info:        The text information to display above the field.

   value.field.label:       The label for the input.

   value.field.placeholder: The placeholder used for the input.

   ========================================================================== #}

<div class="m-form-field-with-button">
    <div class="form-group">
        <label for="{{ value.id }}">
            <b>{{ value.label }}</b>
            {{ '(required)' if value.required else '' }}
        </label>

        <input id="{{ ('form_' ~ range(1, 100) | random) }}"
               type="{{ value.type }}"
               placeholder="{{ value.placeholder }}"
               name="{{ field or '' }}"
               class="m-form-field-with-button_field"
               {{ 'required' if value.required else '' }}>
    </div>
    <p>{{ parse_links(value.info) | safe }}</p>
    <input class="btn btn__full" type="submit" value="{{ value.btn_text }}">
</div>
<commit_msg>form id support in template<commit_after>{# ==========================================================================

   form_field_with_button.render()

   ==========================================================================

   Description:

   Creates a form field with text when given:

   value:  An object used to customize the markup.

   value.btn_text:          The text for the submit button.

   value.field.required:    Boolean indicating whether the field is required.

   value.field.info:        The text information to display above the field.

   value.field.label:       The label for the input.

   value.field.placeholder: The placeholder used for the input.

   ========================================================================== #}

<div class="m-form-field-with-button">
    {% set form_id = ('form_' ~ range(1, 100) | random) %}
    <div class="form-group">
        <label for="{{ form_id }}">
            <b>{{ value.label }}</b>
            {{ '(required)' if value.required else '' }}
        </label>

        <input id="{{ form_id }}"
               type="{{ value.type }}"
               placeholder="{{ value.placeholder }}"
               name="{{ field or '' }}"
               class="m-form-field-with-button_field"
               {{ 'required' if value.required else '' }}>
    </div>
    <p>{{ parse_links(value.info) | safe }}</p>
    <input class="btn btn__full" type="submit" value="{{ value.btn_text }}">
</div>

{'fraction_non_alphanumeric': 0.27691242644513675, 'fraction_numerical': 0.0027691242644513675, 'mean_word_length': 2.8328912466843503, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5526478', 'n_tokens_mistral': 771, 'n_tokens_neox': 702, 'n_words': 209}