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

Is there any kind of starter/boiler template for the frontend forms? #303

Open
vbmark opened this issue May 2, 2024 · 4 comments
Open
Labels

Comments

@vbmark
Copy link

vbmark commented May 2, 2024

Do there exist any kind of pre-built starter templates for the common forms like register, login, forgot, etc.?

Something already wired to use PHP-Auth as a foundation?

Thank you!

@ocram ocram added the question label May 7, 2024
@ocram
Copy link
Contributor

ocram commented May 7, 2024

The server-side part should be covered fairly well with the examples from the README, right? So that shouldn’t be too complex or leave open too many questions.

As for the client-side part, the README doesn’t really provide anything, that’s right. But that’s because it’s highly dependent on what client-side technologies or frameworks you are using, and this library should be usable with whatever you use on the front-end side.

What would you suggest? That the README provides examples for the front-end part for these forms for a variety of popular frameworks and technologies? Or that we provide a plain HTML form example for every action?

@vbmark
Copy link
Author

vbmark commented May 7, 2024

Yes, the server side documentation is great.

If there were, "...examples for the front-end part for these forms for a variety of popular frameworks and technologies" that would be great too but I know that's a big ask.

Even if you went completely opinionated and picked one, like a simple bootstrap boilerplate with JavaScript, or whatever you would enjoy building around, seeing how well you did the server-side code I'm sure that whatever you went with would be a great basis upon which others could build.

But if that doesn't sound appealing then plain HTML form examples would be greatly appreciated also.

Thank you.

@ocram
Copy link
Contributor

ocram commented May 16, 2024

So I don’t know if it would be helpful to provide boilerplates for the forms for React or Vue or any front-end framework. But either Bootstrap or plain HTML could be done and may provide some value.

For example, if we had the following boilerplate:

<form action="/login" method="post">
<input type="text" name="username" placeholder="Username" /> 
<input type="text" name="password" placeholder="Password" /> 
<input type="checkbox" name="remember" value="1" />
<button type="submit">Log in</button>
</form>

… but not just for the login with a username, but for every single action or task – would you consider that helpful? I mean, you would probably still need to change a lot there (target URL, field names, translations, CSS classes, HTML elements, etc.). But maybe it would still help, I don’t know.

@vbmark
Copy link
Author

vbmark commented May 16, 2024

I found this: https://github.com/schnoog/PHPBoilerPlate

It's a little old but seems to work fine for what I'm looking for. Maybe link to it as a starting point, or fork it and update it if needed.

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

No branches or pull requests

2 participants