Stephanevg / PSHTML

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

Form "target" shouldn't be mandatory #212

Closed TylerLeonhardt closed 5 years ago

TylerLeonhardt commented 5 years ago

Subject of the issue

target is not mandatory in an HTML form so it shouldn't be required in PSHTML.

See: https://www.w3schools.com/tags/att_form_target.asp

towards the bottom is says _self is the default which means that target does not have to be specified.

Steps to reproduce

Form -Id uploadbanner -action AddTwitchDataFile -method post -Attributes @{ enctype="multipart/form-data" }

Expected behaviour

target is not needed.

Actual behaviour

cmdlet Form at command pipeline position 1
Supply values for the following parameters:
target
Stephanevg commented 5 years ago

Thank you SO much for reporting this @TylerLeonhardt . You have no idea what this can mean to me :)

In the mean time, I implemented a fix this morning which is available in this PR -> https://github.com/Stephanevg/PSHTML/pull/214

I removed the mandatory from the target parameter. If target is not specified, it will default to target=_self.

is this an acceptable fix for you?

TylerLeonhardt commented 5 years ago

Perfect!! 😊

Stephanevg commented 5 years ago

great. this is live now on master and the gallery in version 0.7.10.

Please keep up the feedback. Supet much appreciated @tylerLeonardt