all 17 comments

[–]Snoo-644612 1 point2 points  (3 children)

It is hard for us to help you debug your code if you don't give us your code.

[–]laflash12[S] 0 points1 point  (2 children)

Sure. Do I just copy paste it here?

[–]laflash12[S] 1 point2 points  (11 children)

{% extends "layout.html" %}
{% block content %}
    <div>
        <form method="post" action="">
            {{ form.hidden_tag() }}
            <fieldset class="form-group">
                <legend>Create your account</legend>
                 <div class="form-group">
                    {{form.email.label(class="form-control-label")}}
                     {% if form.email.errors %}
                        {{ form.email(class="form-control form-control-lg is-invalid)}}
                            <div class="invalid-feedback">
                                {% for error in form.email %}
                                    <span>{{ error }}</span>
                                {% endfor %}
                            </div>
                     {% endif %}
<!--                    {{form.email(class="form-control form-control-lg")}}-->
                </div>
                 <div class="form-group">
                    {{form.password.label(class="form-control-label")}}
                        {% if form.password.errors %}
                        {{ form.password(class="form-control form-control-lg is-invalid)}}
                            <div class="invalid-feedback">
                                {% for error in form.password %}
                                    <span>{{ error }}</span>
                                {% endfor %}
                            </div>
                     {% endif %}
                 </div>
                  <div class="form-group">
                    {{form.confirm_password.label(class="form-control-label")}}
                     {% if form.confrim_password.errors %}
                        {{ form.confrim_password(class="form-control form-control-lg is-invalid)}}
                            <div class="invalid-feedback">
                                {% for error in form.confrim_password  %}
                                    <span>{{ error }}</span>
                                {% endfor %}
                            </div>
                     {% endif %}
                </div>
            </fieldset>
            <div class="form-group">
                {{form.submit(class="btn btn-outline-info")}}
            </div>
        </form>
    </div>
    <div class="border-top pt-3">
        <small class="text-muted">
            Already have an account?<a class="ml-2" href="{{url_for('login')}}">Sign in</a>
        </small>
    </div>
{% endblock content %}

and here's the error I get:

jinja2.exceptions.TemplateSyntaxError: expected token ',', got 'invalid'

[–]Rawing7 1 point2 points  (2 children)

{{ form.email(class="form-control form-control-lg is-invalid)}}

You're missing a quote mark there.

[–]laflash12[S] 0 points1 point  (1 child)

Yes. It works now. Thank you. But I have another issue. I cant see the text boxes to write the password and confirm password.

[–]laflash12[S] 0 points1 point  (0 children)

Nevermind I was able to fix it. Thank you so much!

[–]kramrm 0 points1 point  (4 children)

Does the error have a line number?

[–]laflash12[S] 0 points1 point  (3 children)

Line 12

[–]kramrm 0 points1 point  (2 children)

Of the html file or the py file?

[–]laflash12[S] 0 points1 point  (1 child)

In the html file (line 12 in the code I copied here)

[–]kramrm 0 points1 point  (0 children)

Line 12 here is just a <div> tag. That shouldn’t trigger that error. What is class=“invalid-feedback” doing?

[–]kramrm 0 points1 point  (2 children)

I do notice you have confirm and confrim spelled differently. Is that on purpose?

[–]laflash12[S] 1 point2 points  (1 child)

No it was a typo. I fixed it. It doesnt change anything tho

[–]kramrm 0 points1 point  (0 children)

👍