Creating a page with a fillable sheet [SOLVED]
#7
(2019-01-03, 08:14 AM)Omar G. Wrote: As I understand you will be more lucky checking what is already coded.

Feel free to check the code from my plugins, and once you find specific issues you might get better assistance.

I would start at creating the database table that meets your needs.
https://github.com/Sama34/OUGC-Announcem...s.php#L846

Ideally tables are created in _installation() and removed in _uninstallation().

Hello again Omar, i've managed myself to create a new page with a form (which is inside a custom template)! I did following MyBB documentation about Plugin Development and i think that i should work for me. With your link i know how to create a table and that pure gold, thanks a lot. Now, I have another problem! How can I handle forms?

This is my template:

<form action="#" method="POST">
    <input type="text" name="name" placeholder="Nombre" required>
    
    <input type="submit" value="Crear">
</form>

And this is the function that creates my character sheet page:

function character_sheet_form()
{
    global $mybb, $templates;

    if($mybb->get_input('character') == 'charactersheetform')
    {
        add_breadcrumb('Hoja de personaje', "misc.php?character=charactersheetform");

        $sheet_title = 'Hoja de personaje';
        eval('$sections = "' . $templates->get('character_sheet_template') . '";');

        eval("\$page = \"" . $templates->get("misc_help") . "\";");
        output_page($page);
    }
}

It is something really basic, I know, it is just for testing. Now, how can I handle that form? I think that creating a new function that handles the request should do the job, but I don't know how to start. Could you help me ?

Also, thanks a lot (again) for your help!
Reply


Messages In This Thread
RE: Creating a page with a fillable sheet - by enrolmudas - 2019-01-03, 08:04 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)