New-udinput column size

I am creating a form for facilities group to fill out when they run their safety tests on lab machines.
is there a way I can minimize the column length - they don’t need an entire row - most input will be 2 words.
I was hoping not to have a submit button for every column and just one submit for all columns.

$dashboard = new-uddashboard -title “layout” -content {
New-udrow -columns {

    New-udcolumn -smallsize 3 -content {

        New-UDInput  -Id "Form" -Content {
            New-UDInputField -Type 'textbox' -Name 'operation' -Placeholder 'operation'
            new-udinputfield -type 'textbox' -Name 'operation' -Placeholder 'Lab'
            } -Endpoint { param($operation, $lab) }
        }
            New-udcolumn -smallsize 3 -content {

                New-UDInput  -Id "Form" -Content {
                    New-UDInputField -Type 'textbox' -Name 'operation' -Placeholder 'device'
                    new-udinputfield -type 'textbox' -Name 'operation' -Placeholder 'airflow'
                } -Endpoint {
                    param($device, $airflow)

            }

        }

}

Hi @patg I see you are using the same -Name ‘operation’ the name parameter is for the variable on the parameter…have a look at:-
https://docs.universaldashboard.io/components/inputs#creating-a-new-input
The placeholder is just the text that goes by that field…so in your above code everything would have the variable $operation applied to it.

thanks - I corrected that.
any suggestions on how to get many small columns for the input field and one submit button…

thanks
pg

Use the grid layout option…this gives me a 3 by 3 question field form with one submit button for lots of questions.
New-UDTab -Text “New Vehicle” -Content {
$Layout = ‘{“lg”:[{“w”:7,“h”:14,“x”:2,“y”:0,“i”:“grid-element-inputid”,“moved”:false,“static”:false}]}’

            New-UDGridLayout -Layout $Layout -Content {
                New-UDInput -Id "inputid" -Title "New Vehicle Input" -Endpoint {
                    param(
                        [Parameter(HelpMessage = "Vehicle Agreement")]
                        [ValidateSet("Spot Rent", "Contract Rent", "Owned")]$hire,
                        [Parameter(Mandatory)][UniversalDashboard.ValidationErrorMessage("The registration number you entered is invalid.")][ValidateLength(7, 7)][string]$RegistrationNumber,
                        [Parameter(Mandatory)][UniversalDashboard.ValidationErrorMessage("You must type in something.")][string]$Make,
                        [Parameter(Mandatory)][UniversalDashboard.ValidationErrorMessage("You must type in something.")][string]$Model,
                        [Parameter(HelpMessage = "Select Weight")][ValidateSet("0.5 tonne", "3.5 tonne", "5 tonne", "7.2 tonne", "7.5 tonne", "12 tonne", "15 tonne", "26 tonne")]$Weight,
                        [Parameter(Mandatory)][UniversalDashboard.ValidationErrorMessage("You must type in something.")][string]$BodyType,
                        [Parameter(Mandatory)][string]$Value,
                        [Parameter(HelpMessage = "Engine Type")][ValidateSet("Euro 1", "Euro 2", "Euro 3", "Euro 4", "Euro 5", "Euro 6", "Euro 7")]$EngineType,
                        [Parameter(Mandatory)][UniversalDashboard.ValidationErrorMessage("You must type in something.")][string]$HireCompany,
                        [Parameter(HelpMessage = "Select Depot")][ValidateSet("YourSite","YourSite2","YourSite3")]$DepotName,
                        [Parameter(Mandatory)][UniversalDashboard.ValidationErrorMessage("The date format must be YYYY-MM-DD format.")][ValidatePattern('[0-9]{4}-[0-9]{2}-[0-9]{2}')][string]$StartDate,
                        [Parameter(Mandatory)][UniversalDashboard.ValidationErrorMessage("The date format must be YYYY-MM-DD format.")][ValidatePattern('[0-9]{4}-[0-9]{2}-[0-9]{2}')][string]$EndDate
                    )

Also an FYI all your -input parameters must have a unique name

thanks! i need to update my ud - it’s at 2.1 and i am going up to 2.5.
then i 'll work through this and let you know - thanks again

Sorry @patg yeah the input did change in 2.5.2 pretty sure what I posted works in 2.4.0 as well. I think the version was 2.4.0 when the page designer came out which I thought was awesome, an online version is here:- https://uddesigner.azurewebsites.net/home
but for some reason this doesn’t seem to be included in 2.5.2? :thinking:
More information on gridlayout is on the docs page and new poshud demo page in 2.5.2

code looks good it just doesn’t work for me…I keep getting Component not registered: tab. I tried a number of things but nothing seems to work. I am at version 2.4 now. I cant figure it out. I have a full licence etc…

Hey @patg just take the tag coding out…a full version of this example I gave you can be found here https://github.com/psDevUK/psUniversalDashboard/blob/master/PagesGitHub/HomePage.ps1 you need to put the new-udtab inside a new-udtabcontainer…there is a demo here that @adam put on github too https://github.com/ironmansoftware/universal-dashboard/blob/master/src/UniversalDashboard.Materialize/Tests/tabs.tests.ps1 hopefully this sorts the issue for you? I found tabs a really neat way of having multiple pages on one page