I want to implement a multistep form using ajax, the first step is a welcome screen with only text and submit button, when the user press start (submit) it increase the step and move to the next step, the next step have different form elements and a submit button.
the form is working correctly, I need to make the form replace in the new step using ajax and without reloading the whole page.
the following code is demonstrating my current form class without ajax and it's working as expected:
I have an entity form that allows an admin to select a content type (checkbox) and an autocomplete field that is tapped into a VIEWS Entity Reference (via the Reference Method).
Goal: What I would like is to have the views entity reference filter dynamically change based off the end-user selection. Contextual Filters would have worked but I think Filters is better because of the multiple selection.
At the moment i'm building a module for drupal commerce 2 that makes it possible to add a price to product attributes themselves in addition to the product price.
Example:::
Attribute Color:
Red = € 4
Blue = € 7
Green = € 10
Attribute Size:
80 = € 0
90 = € 10
100 = € 12
Product T-shirt:
Base price = € 20
So a T-shirt with the attributes Green and 90 selected would be €40. A T-shirt with the attribute Red and 100 selected would be € 36.
I know how to add links to this drop button, but I would now like to call a function within my form class when a specific item in my drop button is clicked.
Any ideas or suggestions as to how I could go about achieving this?