{{ no such element: dict object['csrf_token'] }}

I have a html form and i want to insert data in form fields into database.But when i try to submit form I get error in console window of chrome.

Failed to load resource: the server responded with a status of 400 (BAD REQUEST)

So I tried to generate token csrf_token in my html form by adding a hidden input field has value:
<input type="text" name="X-Frappe-CSRF-Token" value="{{ frappe.csrf_token}}">

But I get {{ no such element: dict object[‘csrf_token’] }} error in the text box.
thanks