Python Forum
I am trying to space the registration forms using css. But it is not working.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I am trying to space the registration forms using css. But it is not working.
#1
Can someone explain how to fix it? I am using python flask and wtf forms.

link to wtf forms

forms.py

 

from wtforms import Form, BooleanField, StringField, PasswordField, validators
# what does Form do
class RegistrationForm(Form):
    username = StringField('Username', [validators.Length(min=2, max=25)])
    
    email = StringField('Email', [validators.Length(min=4, max=25)])
    
    password = PasswordField('New Password', [
    validators.DataRequired(),
    validators.EqualTo('confirm', message='Passwords must match')
    ])

    confirm_password = PasswordField('Repeat Password')
 


register.css

label 
{
    display: block;
}   



register.html
 
<!DOCTYPE html>
<html>
    <head>
        <title> register </title>
        <link rel="stylesheet" type="text/css" href="register.css"/>
    </head>  
    <body>  
        <form action="/register" id="register_forms"  method="POST">
       fields/16379203 -->        
            <label for="username">
                Username   
               {{(form.username)}}
            </label> 
            
            <label for="email">
                Email
                {{form.email}}
            </label>

            <label for="password">  
                Password
                {{form.password}} 
            </label> 
            
            <label for="password_form">
                Confirm Password
                {{form.confirm_password}}
            </label>
            
            <label>
                <input type = "button"  Submit value = "Submit" >
            </label>    
        </form>
    </body>      
</html>
 


output of the code imgur link


Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Registration Form Fields rwahdan 2 1,835 Aug-09-2022, 10:35 AM
Last Post: Addweb
  How to fill text fields web forms Martinelli 1 2,016 Sep-25-2019, 11:14 PM
Last Post: Martinelli
  How to get data from forms? dmytruk 1 2,623 Apr-02-2019, 10:53 PM
Last Post: dmytruk
  Forms, python, passlib and other questions marienbad 1 2,405 Feb-05-2019, 04:23 AM
Last Post: snippsat
  Forms to render "Guide in steps" or not? stablepeak 1 2,225 Nov-29-2018, 10:05 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020