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 316037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:20:48+00:00 2026-05-12T08:20:48+00:00

for field in FIELDS: row = [] row.append(<tr>) row.append(<td> + str(myform.fields.get(field)) + </td>) row.append(</tr>)

  • 0
for field in FIELDS:
    row = []
    row.append("<tr>")
    row.append("<td>" + str(myform.fields.get(field)) + "</td>")
    row.append("</tr>")

    custom_fields.append("".join(row))

When I give the custom_fields variable to the template, all I’m getting is:

<tr><td><django.forms.widgets.CheckboxInput object at 0x1fa7d90></td></tr>

How can I get the form rendered properly?


This is what I’m going to be doing eventually:

form1 = CustomForm1()
form2 = CustomForm2()
form3 = CustomForm3()

for field in FIELDS:
    row = []
    row.append("<tr>")
    row.append("<td>" + str(form1.fields.get(field)) + "</td>")
    row.append("<td>" + str(form2.fields.get(field)) + "</td>")
    row.append("<td>" + str(form3.fields.get(field)) + "</td>")
    row.append("</tr>")

    custom_fields.append("".join(row))

So I can display all form fields together in one table.

  • 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-12T08:20:49+00:00Added an answer on May 12, 2026 at 8:20 am

    I just figured this out. It’s form[field] instead of form.fields[field]

    >>> f = MyForm()
    >>> f
    <myform.forms.MyForm object at 0x1fa7810>
    
    >>> f['myfield']
    <django.forms.forms.BoundField object at 0x20c7e50>
    
    >>> f.fields['myfield']
    <django.forms.fields.BooleanField object at 0x1fa7850>
    

    so form.fields is a list of all unbound fields, and form.__getitem__ is a callable that returns the bound fields.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

IP.Nexus puts custom fields into a table all muddled up into one row and
in Excel , in my pivot tables when i drop down the row fields,
The 'id' field of my table auto increases when I insert a row. I
How do I reference a field in the current row through an ASP.NET GridView
I have a table where each row has a description field as well as
I there a way to update a row without mentioning fields name ? I
I have a CSV with 3 fields: name, latitude, longitude. A row of looks
I have some xml like this: <Data> <Rows> <Row> <Field Name=title>Mr</Field> <Field Name=surname>Doe</Field> <Row>
OK, I can get the number of the last row created, as I do
I'm grabbing field row from one table and creating a new table for each

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.