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

Add text/HTML to the form without input field #12

Open
GlennM opened this issue May 12, 2013 · 9 comments
Open

Add text/HTML to the form without input field #12

GlennM opened this issue May 12, 2013 · 9 comments

Comments

@GlennM
Copy link

GlennM commented May 12, 2013

The wordpress-settings-api-class uses the show_forms function to generate the form pages. It is now only possible to generate input fields, sections and descriptions, which makes the layout of the form quite limited.

Would it be possible to add an option for just displaying plain text/HTML as well (so the form includes some text, or a link, without an input field).

I've included a screenshot of WordPress SEO by Yoast to show what I mean:

wp-settings-api-text-html-addition

@tareq1988
Copy link
Owner

Do you have any solutions in mind?

@GlennM
Copy link
Author

GlennM commented May 13, 2013

Maybe a solution would be to include another callback type in the class which just renders text/HTML without displaying an option. Then you can add the appropriate callback to an array element in the get_settings_fields() function.

@herewithme
Copy link
Contributor

It seems to me that this is already possible with the "html" field, right?
My version supports it anyway:
https://github.com/herewithme/wordpress-settings-api-class

@tareq1988
Copy link
Owner

@herewithme your modifications looks impressive, the only thing I didn't like is tabs. I prefer tabs, because it doesn't need a page load. Other than that, it would be good for a pull request.

@herewithme
Copy link
Contributor

I agree, the tabs is typically practiced.

But in the implementation you propose each tab has its own "submit" button which is against productive because each form contained in the tabs is truly independent.

In fact, it loses the user saves the contents of a single form, and not all the tabs.

@tareq1988
Copy link
Owner

Yeah I understand the concern, but as every tab has it's own submit button,
that makes sense though.

@herewithme
Copy link
Contributor

I do not share your opinion.

I myself was convinced that the "save" button saved the data from all tabs, not just the current tab.

@jesselawson
Copy link

I have a fork of this project that I'm creating a wrapper for. The save button saves all data across the tabs.

@WebDragon
Copy link

I would like to second the opinion that there should be a single "Save" button that appears regardless of which tab is active, and saves all data across the tabs. That's just good User Interface Design doing what you would expect a well-designed interface to do.

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

No branches or pull requests

5 participants