diff --git a/src/registrar/templates/domain_nameservers.html b/src/registrar/templates/domain_nameservers.html index f9e901b32..f1dd3cff8 100644 --- a/src/registrar/templates/domain_nameservers.html +++ b/src/registrar/templates/domain_nameservers.html @@ -18,6 +18,7 @@ {{ formset.management_form }} {% for form in formset %} + {% with sublabel_text="Example: ns"|concat:forloop.counter|concat:".nameserver.com" %} {% if forloop.counter <= 2 %} {% with attr_required=True %} {% input_with_errors form.server %} @@ -25,9 +26,17 @@ {% else %} {% input_with_errors form.server %} {% endif %} + {% endwith %} {% endfor %} - + + + diff --git a/src/registrar/templates/includes/input_with_errors.html b/src/registrar/templates/includes/input_with_errors.html index 54ae475bf..2724aef28 100644 --- a/src/registrar/templates/includes/input_with_errors.html +++ b/src/registrar/templates/includes/input_with_errors.html @@ -28,6 +28,10 @@ error messages, if necessary. {% include "django/forms/label.html" %} {% endif %} + {% if sublabel_text %} +

{{ sublabel_text }}

+ {% endif %} + {% if field.errors %}
{% for error in field.errors %} @@ -71,4 +75,4 @@ error messages, if necessary.
-{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/registrar/templatetags/__init__.py b/src/registrar/templatetags/__init__.py index 013c5a89b..a822ec3e3 100644 --- a/src/registrar/templatetags/__init__.py +++ b/src/registrar/templatetags/__init__.py @@ -6,3 +6,8 @@ from django.template.defaulttags import register @register.filter def get_item(dictionary, key): return dictionary.get(key) + +@register.filter +def concat(arg1, arg2): + """concatenate arg1 & arg2""" + return str(arg1) + str(arg2)