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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:39:15+00:00 2026-05-25T18:39:15+00:00

In Python CGI, is it possible pass Python list as hidden text input field

  • 0

In Python CGI, is it possible pass “Python list” as hidden text input field ?
How can I retrieve values using cgi form later ?

Thanks for help.

def testinput2(answer):
    #answer=['a','b','a','a','a']#according to abc1 statefile
        fin = file("2.map", "r")

        for line in fin.readlines():
            fun.append(line.strip().split(','))
        fin.close()
        print "<br>Action Traversal\t", answer
    for id,val in enumerate(answer):
        if id < 1:
                    first(fun,val)
                else:
                    secondandon(fun,val)


        print "<br><FORM ACTION=\"/cgi-bin/bul.py\" METHOD=\"POST\"><input type=\"hidden\" name=\"nxtans\" value=\"%s"%answer,"\"><input type=\"text\" name=\"nxtv\" value=\"\"><INPUT TYPE=SUBMIT VALUE=\"Next State Click\"></FORM><br><br>"
  • 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-25T18:39:16+00:00Added an answer on May 25, 2026 at 6:39 pm

    No, HTML elements only support one value per an input element and know nothing of Python lists.

    If you want to save a list of values in html, you should create list of hidden HTML inputs, each with the same name attribute.

    You can later get the list of values with form.getvalue(key), where the key is the value of the name attribute.

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

Sidebar

Related Questions

What is the best way to pass List via form in python (cgi). ListStr
I'm using pycurl to upload a file via put and python cgi script to
How can I find out the http request my python cgi received? I need
How can my python cgi return a specific http status code, such as 403
I'm writing a python CGI script that will query a MySQL database. I'm using
Can python cgi scripts write and read data to the session? If so how?
I have written an html form and am trying to incorporate a python cgi
I have the following html button <td><form id=form2 name=form2 method=post onclick=../cgi-bin/py/GuestBookEntry.py> <input type=submit name=gBookSrib
I met a problem while using python(2.6) cgi to show a mime data in
I have a PYTHON CGI script(Content-type: text/plain ) which takes about 10 minutes to

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.