Reputation: 83279
As the title states, I'm looking for a some kind of form plugin in Node.js that will allow me to create forms in a manner similar to Rails. I've come across several Node.js form plugins, with the closest one being Formed. However, that plugin is specific to Sequelize (I am using JugglingDB).
Ideally, it would be nice to do something similar to the following (assuming EJS):
<%- form_for(user, function(form) { %>
<%- form.input('username') %>
<%- form.input('password') %>
<%- form.submit() %>
<%- }) %>
with output similar to the following:
<form action="/users" method="post" id="new_user_form">
<div class="input required">
<label for="user_username">Username</label>
<input type="text" name="user_username" id="new_user_form_user_username"/>
</div>
<div class="input required">
<label for="user_password">Password</label>
<input type="password" name="user_password" id="new_user_form_user_password"/>
</div>
<input type="submit" name="user_submit" value="Create User"/>
</form>
The only other plugin I've come across that seems to have some sort of following and recent updates is Formidable. Unfortunately, this plugin doesn't have anything to do with the rendering of forms, just the processing of forms.
Upvotes: 1
Views: 155