Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
416 views
in Technique[技术] by (71.8m points)

rust - How to retrieve values from tera template by rocket framework?

I need to get values from input form of tera template to rocket code. How can I do that? Here is the template:

{% extends "base" %}

{% block content %}
    <h3>Task:</h3>
    <ul>
        <p>{{task}}</p>
        <input type="text" name="answer">
    </ul>

    <p>Return to main menu <a href="/home">Home</a></p>
{% endblock content %}

I need somehow retrieve the value from the field. If there is a way to receive it by pressing "Enter" that would be even nicer. Thank you for your attention.

I know what to do on the rocket end, but I don't know how to send data from tera templates.

Also, if somebody can say how to do it by pressing "Enter" for example, that would be really great.

question from:https://stackoverflow.com/questions/65849187/how-to-retrieve-values-from-tera-template-by-rocket-framework

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...