This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Could someone please explain the steps needed to create a form on the front end (public side) that saves to the database ?
I've already created the Model and .yaml files using Builder, but despite searching extensively, I can't find any complete examples showing the code for saving front end form values to a database.
Surely this must be a very popular requirement, such as Registration Forms etc.
I'd be grateful for any help please and I'm sure any replies would help others.
You may create new plugin (for frontend), then use your plugin model (build with builder) to the new one
Hi,
On every october installation there is an october demo plugin. There you can add todos on frotend. Did you check this?
Regards Crazymodder
Well, It's very easy actually
You can create a normal form using HTML.
After that you can choose to use October Ajax or Normal (post and get) methods.
for example if you choose using October Ajax you can set data-request attribute in your form tag.
the function which you will set in data-request you can define it in (The Layout) which you're coding.
Notice that you must define the function in the layout even if your form is in a partial.
If you need more information don't hesitate to ask and I'll provide a full explanation.
LilEssam said:
Well, It's very easy actually
You can create a normal form using HTML.
After that you can choose to use October Ajax or Normal (post and get) methods.
for example if you choose using October Ajax you can set data-request attribute in your form tag.
the function which you will set in data-request you can define it in (The Layout) which you're coding.
Notice that you must define the function in the layout even if your form is in a partial.
If you need more information don't hesitate to ask and I'll provide a full explanation.
LilEssam said:
Well, It's very easy actually
You can create a normal form using HTML.
After that you can choose to use October Ajax or Normal (post and get) methods.
for example if you choose using October Ajax you can set data-request attribute in your form tag.
the function which you will set in data-request you can define it in (The Layout) which you're coding.
Notice that you must define the function in the layout even if your form is in a partial.
If you need more information don't hesitate to ask and I'll provide a full explanation.
Is it possible to create custom Controllers and Routes without creating a plugin, like in Laravel?
1-6 of 6