Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emulating standard forms for entering a new record #42

Open
dandv opened this issue Dec 10, 2012 · 1 comment
Open

Emulating standard forms for entering a new record #42

dandv opened this issue Dec 10, 2012 · 1 comment

Comments

@dandv
Copy link

dandv commented Dec 10, 2012

Excellent project! I have a question about new records:

Currently, the UI for entering new information, say a new user signing up, doesn't look like a form, and is not familiar to web users - http://vitalets.github.com/x-editable/docs.html#newrecord

Is there a way to have a classic form look for that case? With empty fields, and Tab going to next field etc.

@vitalets
Copy link
Owner

It's a good idea i'm also thinking.. In current version there are three options that together can emulate classic form.
You can try:

$('#usertable a').editable(
    ...
    send: 'never',
    showbuttons: false,
    onblur: 'ignore'
).editable('show'); 

And in save button handler collect values via $('#usertable a').editable('getValue');
The only difference that each control will hide after entering value. It's required for getValue method to return correct values.

I will appreciate you feedback on this as it seems intresting approach but I didn't play with it anough.
thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants