Multiple selections - 1 button

Looking at designing an order page, and I have the basic selections. However, I need to ‘submit’ each option individually (see screenshot)

Is there a way to set all the options and only have 1 submit button?

It looks like you are using New-UDInput. You could 1 UDInput that has multiple selects and then when you click submit it orders the VM. In that case you wouldnt have an over view pane like you have now.

The other thing you could do is use New-UDSelect and then on selection change, you could update some $Session variables with the values and then use Sync-UDElement to update the overview pane.

Then you could use the $Session variables when clicking the place order button.

sorry forgot to post my code

 New-UDRow {
        New-UDColumn -Size 2 {
            New-UDLayout -Columns 1 -Content {
                New-UDInput -Title "CPU cores" -Endpoint {
                    param([ValidateSet("1", "2", "3", "4", "5", "6", "7", "8")]$CPUcount)

                    #New-UDInputAction -Toast "CPU Cores selected: $CPUcount"
                    Set-UDElement -Id "CPU_Value" -Content {"CPU: $CPUcount"}
                } -FontColor "black"
            }
        }
        New-UDColumn -Size 2 {
            New-UDLayout -Columns 1 -Content {
                New-UDInput -Title "Memory Size (GB)" -Endpoint {
                    param([ValidateSet("1", "2", "3", "4", "5", "6", "7", "8")]$MEMcount)

                    Set-UDElement -Id "MEM_Value" -Content {"Mem (GB): $MEMcount"}
                } -FontColor "black"
            }
        }

        New-UDColumn -Size 2 {
            New-UDLayout -Columns 1 -Content {
                New-UDInput -Title "Disk Size (GB)" -Endpoint {
                    param([ValidateSet("50", "100", "200", "250", "500", "750", "1024", "2048")]$DISKsize)

                    Set-UDElement -Id "HDD_Value" -Content {"Disk (GB): $DISKsize"}
                } -FontColor "black"
            }
        }
        New-UDColumn -Size 2 {
            New-UDLayout -Columns 1 -Content {
                New-UDInput -Title "Guest OS" -Endpoint {
                    param([ValidateSet("Windows 2016", "RHEL Linux 7.4", "Ubuntu 16.4")]$GUESTos)

                    Set-UDElement -Id "OS_Value" -Content {"Guest OS: $GUESTos"}
                } -FontColor "black"
            }
        }

        New-UDColumn -Size 2 {
            New-UDLayout -Columns 1 {
                New-UDElement -Tag 'div' -Content {
                    New-UDElement -Tag 'h5' -Content {"VM Specs"}
                    New-UDElement -Tag 'p' -Content {"Your chosen VM is a as follows:"}
                    New-UDElement -Tag 'p' -id "CPU_Value" -Content {" "}
                    New-UDElement -Tag 'p' -id "MEM_Value" -Content {" "}
                    New-UDElement -Tag 'p' -id "HDD_Value" -Content {" "}
                    New-UDElement -Tag 'p' -id "OS_Value" -Content {" "}

                }

            }
        }

       New-UDColumn -Size 2 { 
            New-UDHeading -Size 5 -Id "Submit" -Text ""
            New-UDButton -Text "Place Order" -OnClick {
                Send-MailMessage -to "CraigD <craig.dalrymple@brightsolid.com>" -subject $subject  -SmtpServer $SMTPServer -from $Sender #-BodyAsHtml $HTML
                Set-UDElement -Id "Submit" -Content { "Order Submitted" }
            }
        }
    }

so yeah New-UDInput. So I can just use

New-UDInput -Title "CPU cores" -Endpoint {
                    param([ValidateSet("1", "2", "3", "4", "5", "6", "7", "8")]$CPUcount)

                    New-UDInputAction -Toast "CPU Cores selected: $CPUcount"
                    Set-UDElement -Id "CPU_Value" -Content {"CPU: $CPUcount"}

                    param([ValidateSet("1", "2", "3", "4", "5", "6", "7", "8")]$MEMcount)

                    Set-UDElement -Id "MEM_Value" -Content {"Mem (GB): $MEMcount"}

                } -FontColor "black

?

You need to include all the parameters in the same param block. When you click submit, you then get the value to all the parameters.

New-UDInput -Title "Create VM" -Endpoint {
                    param([ValidateSet("1", "2", "3", "4", "5", "6", "7", "8")]$CPUcount, 
                                [ValidateSet("1", "2", "3", "4", "5", "6", "7", "8")]$MEMcount)

                 # Could create VM right away

                # Or could use someting like Show-UDModal to pop up a modal for confirmation 

                Show-UDModal -Title "Place Order?" -Content {
                      New-UDCard -Content {
                                "CPU Count: $CPUCount "
                      }
                      New-UDButton "Place Order" -OnClick { }
                }

                } -FontColor "black -SubmitText "Place Order"