MyBB Community Forums

Full Version: Automating forms
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to automate forms like in the settings? I am gaining a fairly quick understanding of how your system is working, but one thing that seems off is that your admin pages are hard-coding manual forms into them. Yet, your settings page are using automated forms with column data.

Wouldn't it just be possible to create custom automated forms like the settings table, without having to hard-code and custom create these same features?

For instance, in your thread_prefixes.php file, you are custom coding these forms. Then, I can see the exact same kinds of forms being automated in the settings page based upon data in the settings records.

Why have automated forms in the settings table, but then hard-code & manually style, manually build, manually create HTML write-up & javascript and other similar features in admin pages that are not the settings page, but are literally creating the same kind of form?

Am I wrong here? Shouldn't we be able to automate forms quickly in the backend by creating arrays that mimic the settings records? Why do we have to manually create the same forms, when clearly there is some automated form parser somewhere in the MyBB backend for settings?
The ACP is planned to be re-written.
You can extend the page class and define / override with your own methods.
(2019-05-08, 08:29 PM)effone Wrote: [ -> ]The ACP is planned to be re-written.
You can extend the page class and define / override with your own methods.

I see. So you have a lot of artifacts in the code because you have tons of files I presume.

I appreciate your help. Would you give me an example of how to generate a form using the Page class? I don't know enough about your CMS to do this so quickly.
A quick start may be looking at admin/styles/default/style.php