Action and method as component settings for CMS forms

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
niloofar
Posts: 16
Joined: 04 Apr 2021, 09:41

Action and method as component settings for CMS forms

Post by niloofar » 25 Jul 2021, 19:56

Hi

I was wondering if there's an option for defining a form's `method` and `action` values in the CMS component settings?
Aimeos version: ~2021.07
Laravel version: ^8.40
PHP: 7.4.9

User avatar
aimeos
Administrator
Posts: 7865
Joined: 01 Jan 1970, 00:00

Re: Action and method as component settings for CMS forms

Post by aimeos » 26 Jul 2021, 06:20

You have to create a component like this one:
https://github.com/aimeos/ai-cms-grapes ... #L449-L516

The traits define the options (method and action in your case) and the init and "on...Change" methods define what happens. Finally, add a block like this which defines the form:
https://github.com/aimeos/ai-cms-grapes ... #L335-L362
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply