adamwathan / bootforms

Rapid form generation with Bootstrap 3 and Laravel.
MIT License
417 stars 103 forks source link

Passing $options to open() #13

Closed ashleydw closed 10 years ago

ashleydw commented 10 years ago

Am I missing how we pass $options through to $this->builder->open(); ?

I would like to set the route via $options

adamwathan commented 10 years ago

Hey, check out the documentation for the underlying form package here if you haven't already:

https://github.com/adamwathan/form/blob/master/readme.md#opening-a-form

It works differently than the Laravel form builder if that's what you're thinking of, and doesn't directly have access to Laravel's routes.

If you wanted to set the form action to a named Laravel route, something like this should do the trick:

$this->builder->open()->action(URL::route('register'));

Let me know if that answers your question, or if something's not working properly and I'll try and give you a better answer!

ashleydw commented 10 years ago

Thanks for your quick answer, I created a pull request. Otherwise I will check out your suggestions.