Stephanevg / PSHTML

Cross platform Powershell module to generate HTML markup language
https://pshtml.readthedocs.io/en/latest/
Other
168 stars 43 forks source link

Missing 'form' parameter 'enctype' #213

Closed TylerLeonhardt closed 5 years ago

TylerLeonhardt commented 5 years ago

Subject of the issue

as explained here the enctype attribute is used to declare how form data should be encoded. This is needed if you're trying to generate a form that uploads files.

Steps to reproduce

Look at Form function.

Expected behaviour

It should have an enctype parameter.

Actual behaviour

It doesn't have an enctype parameter.

I'm using -Attributes as a workaround but it would be nice to not have to use that!

Stephanevg commented 5 years ago

Hi @TylerLeonhardt Thank you SO much for opening this issue.

I have built the -Attributes parameter exactly for that purpose. Thanks for reporting this. I'll work on it and make anothe release ASAP.

Stephanevg commented 5 years ago

Hi again,

I have added a dynamic parameter for enctype, which is only available when Method is set to Post. These are the three acceptable values:

See PR here --> https://github.com/Stephanevg/PSHTML/pull/214

is this an acceptable solution for your @TylerLeonhardt ?

TylerLeonhardt commented 5 years ago

Perfect!!