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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:00:12+00:00 2026-05-25T13:00:12+00:00

I have a template in which I placed, let’s say 5 forms, but all

  • 0

I have a template in which I placed, let’s say 5 forms, but all disabled to be posted except for the first one. The next form can only be filled if I click a button that enables it first.

I’m looking for a way to implement a Django-like forloop.last templatetag variable in a for loop inside an acceptance test to decide whether to execute a method that enables the next form or not.

Basically what I need to do is something like:

for form_data in step.hashes:
    # get and fill the current form with data in form_data
    if not forloop.last:
        # click the button that enables the next form
# submit all filled forms
  • 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-25T13:00:13+00:00Added an answer on May 25, 2026 at 1:00 pm

    If I am understanding your question correctly, you want a simple test for whether you are at the beginning or end of the list?

    If that’s the case, this would do it:

    for item in list:
        if item != list[-1]:
            #Do stuff
    

    For the first item in the list, you would replace “-1” with 0.

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

Sidebar

Related Questions

I have a Template Column under which I have Placed a Dropdownlist. Now I
I have a template file which will be sent out to all subsidiaries of
I have a Freemarker template which contains a bunch of placeholders for which values
I have a large text template which needs tokenized sections replaced by other text.
I have a file template.txt which contains the following: Hello ${something} I would like
I have an e-mail template which is just a plain, static HTML page. I
I have a ComboBox in WPF which is databound, and has data template which
something driver me crazy here i have a big HTML template which i can't
I have a template class that I serialize (call it C), for which I
If I have a template as follows, which is used to create a button:

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.