Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5936829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:27:12+00:00 2026-05-22T15:27:12+00:00

I have a form which is like: class Address_info_updateForm(forms.Form): street = forms.CharField(label=_(Street), required=True) street2

  • 0

I have a form which is like:

class Address_info_updateForm(forms.Form):
    street = forms.CharField(label=_("Street"), required=True)
    street2 = forms.CharField(label=_("Additional Address"), required=False, max_length=50)
    zip = forms.CharField(label=_("Postcode"), required=True, max_length=50)

    city = forms.CharField(label=_("City"), required=True, max_length=50)
    state = forms.CharField(label=_("State"), required=False, max_length=50)        
    country = forms.ChoiceField(label=_("Country"), choices=countries, widget=forms.Select,    required=True)  

Now I have rendered to template which is like:

{% extends "base/base_page.html" %}
{% load i18n %}
{% load static %}

{% block html_title %}
    {% trans "Update Profile" %}                    
{% endblock %}

{% block html_page_left_content %}


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="stepcarousel.js">

stepcarousel.setup({
  galleryid: 'mygallery2', //id of carousel DIV
  beltclass: 'belt2', //class of inner "belt" DIV containing all the panel DIVs
  panelclass: 'panel2', //class of panel DIVs each holding content
  autostep: {enable:true, moveby:1, pause:3000},
  panelbehavior: {speed:500, wraparound:false, wrapbehavior:'slide', persist:true},
  defaultbuttons: {enable: true, moveby: 1, leftnav: ['{{ STATIC_PREFIX }}images/home/bigarrowleft.png', 5, 168], rightnav: ['{{ STATIC_PREFIX }}images/home/bigarrowright.png', -47, 163]},
  statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
  contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
})


</script>

<div style="height: 400px">
    <div>
        <p class="title">{% trans "BILLING ADDRESS" %}</p>
    </div>
    <form action="" method="POST" class="custom_form">{% csrf_token %}
        <table style="color:black;text-align:left; margin-left: 20px;">

           {% if form.errors %}
                                       <span style="color:red;">{% trans "You have not filled in the form correctly. Please correct the errors"%}:</span>                                                                                              
                        {% endif %}
                        {% for field in form %}
                             {% if not field.is_hidden %}        
                            <tr>
                                    <td>                                                        
                                            {{field.label}}                                                        
                                            {% if field.field.required %}
                                            <span style="color:red;">*</span>
                                            {%endif%}
                                    </td>                                                
                            </tr>
                            {%else%}                        
                                {{field}}{{field.errors}}                                                   
                            {%endif%}
                        {% endfor %}
            <tr>
                <td colspan="2">
                    <input type="submit" value="{% trans "UPDATE" %}">
                    <input type="button" value="{% trans "CANCEL" %}" onclick="document.location.href='{{base_url}}MyProfile/'" class="custom_button">
                </td>
            </tr>
        </table>
    </form>                    
    <script>
        jQuery('select#id_country').wrap('<div class="select_div" />');
    </script>
</div>
{% endblock %}
{% block html_page_right_sidebar_login %}
{% endblock %}

the problem is when i use {{form.as_table}} i see my textboxes along with my form fields in very descent manner.
But when i am using the stepcruousel to display the errors and * marked fields it is NOT SHOWING ME THE TEXTBOXES and it is only showing me the fields with aestrics * like this

Street * and so on

I want the fields to be aestrix along with the texboxes also.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:27:13+00:00Added an answer on May 22, 2026 at 3:27 pm

    To show the field label & textbox you are using:

    {{field.label}}                                                        
    {% if field.field.required %}
    <span style="color:red;">*</span>
    {%endif%}
    

    but this will show only label {{field.label}} but not textbox because there is no {{ field }} which is the widget translated to html of the field (in your case its the text box). Add it:

    {{field.label}}                                                        
    {% if field.field.required %}
    <span style="color:red;">*</span>
    {%endif%}
    {{ field }}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have a form class which looks like below:- class UserCreateForm(wtf.Form): name=wtf.TextField('Name',validators=[validators.Required(),username_check]) email=wtf.TextField('Email')
I have a form for which I would like to toggle a field's required
I have this input form which goes like this: <input type=checkbox name=vehicle value=Bike />
I have a form which is rendered with radio buttons like so: <h2>How long
We have a form which uses the JQuery Validation Plugin and would like to
I have a form which consists of 2 steps. What I'd like to do
I have a form which includes a data sheet. I would like to make
I have simple form like this which accepts only two values string action and
I have a simple modal form which I'd like to close when Esc is
I have a form with input field which can be accessed like var algorithm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.