How to change the size/length of a textbox

Hi everyone.

I’m looking to expand a textbox across a page from the default size/length. How can I achieve this?
I haven’t found any related topics via search, and I’m not seeing anything related to this in documentation.

I’m working with UD v3.1.3.

EDIT:
Came across the New-UDStyle component, reading up on some css styling now… initially tried this with no luck. Not sure if this is the correct route to go down.

New-UDForm -Content {
    New-UDStyle -Style 'width: auto;' -Content {
        New-UDTextBox -Label 'Test' -Id 'test' -Multiline 
    }
}

Will there be any issues using New-UDStyle within a UDForm?

Hi @nqui although I am not using UD v3.1.3 I had an issue where I needed the text box to use just 25% of the page width, so I could get 4 text boxes per row I achieved this using CSS theme.


There is no issue UDStyle I just chose to use a theme as it worked better for my needs. Just for a major clue I found using:-
'.input-field' = @{
        'width' = "25%"
    }

is the CSS you after, so just a case of tweaking that percentage to your needs :partying_face:

1 Like

I’ve also just added a -FullWidth parameter to New-UDTextbox. This will make the textbox take up the full width of it’s container.

3 Likes

@psDevUK Thank you for that blog post. I was able to follow your instructions using inspect element and learned something new :slight_smile:

@adam Great addition! Should I expect it in the next UD framework release or further down the pipe?

1 Like

@adam would it make sense to extend/add the -FullWidth parameter to the AutoComplete input? I’m in a situation where I need to extend the AutoComplete text box.

For now I’m trying to extend the width of it manually as previously done thanks to @psDevUK blog post.

1 Like

Sure. I’ll add this to the backlog.

1 Like

Second this. :slight_smile: