Magento 2.2 - How to Create a custom dynamic checkout form
i have to solve following situation and need some help for the way of the solution.
I have to create a custom checkout form, which input elements are defined in a db table. If the user has the related customer group, than i have to load the form fields and types and parse them as a new checkout form.
The fields are grouped so i want to use a fieldset for each of these.
In the fieldset i want to add the result entries ( table rows ) like
this:
foreach result as row:
row->FORMELEMT | row->DESCRIPTION | row->PRICE
endforeach
and finally a button.
So my question is, what is the best way to create a dynamic form like this?
Using a LayoutProzessor? But how can i add / create a custom Field where i can add the type of field, the description and the price?
Or do i have to use another way, directly with a KO Template and assign the Result Rows in a ConfigProvider, so i can get this in a KO Template?
Hope you understand the task.
Thanks for help,
Andre
checkout magento2.2
add a comment |
i have to solve following situation and need some help for the way of the solution.
I have to create a custom checkout form, which input elements are defined in a db table. If the user has the related customer group, than i have to load the form fields and types and parse them as a new checkout form.
The fields are grouped so i want to use a fieldset for each of these.
In the fieldset i want to add the result entries ( table rows ) like
this:
foreach result as row:
row->FORMELEMT | row->DESCRIPTION | row->PRICE
endforeach
and finally a button.
So my question is, what is the best way to create a dynamic form like this?
Using a LayoutProzessor? But how can i add / create a custom Field where i can add the type of field, the description and the price?
Or do i have to use another way, directly with a KO Template and assign the Result Rows in a ConfigProvider, so i can get this in a KO Template?
Hope you understand the task.
Thanks for help,
Andre
checkout magento2.2
add a comment |
i have to solve following situation and need some help for the way of the solution.
I have to create a custom checkout form, which input elements are defined in a db table. If the user has the related customer group, than i have to load the form fields and types and parse them as a new checkout form.
The fields are grouped so i want to use a fieldset for each of these.
In the fieldset i want to add the result entries ( table rows ) like
this:
foreach result as row:
row->FORMELEMT | row->DESCRIPTION | row->PRICE
endforeach
and finally a button.
So my question is, what is the best way to create a dynamic form like this?
Using a LayoutProzessor? But how can i add / create a custom Field where i can add the type of field, the description and the price?
Or do i have to use another way, directly with a KO Template and assign the Result Rows in a ConfigProvider, so i can get this in a KO Template?
Hope you understand the task.
Thanks for help,
Andre
checkout magento2.2
i have to solve following situation and need some help for the way of the solution.
I have to create a custom checkout form, which input elements are defined in a db table. If the user has the related customer group, than i have to load the form fields and types and parse them as a new checkout form.
The fields are grouped so i want to use a fieldset for each of these.
In the fieldset i want to add the result entries ( table rows ) like
this:
foreach result as row:
row->FORMELEMT | row->DESCRIPTION | row->PRICE
endforeach
and finally a button.
So my question is, what is the best way to create a dynamic form like this?
Using a LayoutProzessor? But how can i add / create a custom Field where i can add the type of field, the description and the price?
Or do i have to use another way, directly with a KO Template and assign the Result Rows in a ConfigProvider, so i can get this in a KO Template?
Hope you understand the task.
Thanks for help,
Andre
checkout magento2.2
checkout magento2.2
asked 14 mins ago
Andre BubnerAndre Bubner
18114
18114
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f265378%2fmagento-2-2-how-to-create-a-custom-dynamic-checkout-form%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f265378%2fmagento-2-2-how-to-create-a-custom-dynamic-checkout-form%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown