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.
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.
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
)
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?
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…