Skip to content

Rendered forms are missing closing tags #28

@TheAutomatingMrLynch

Description

@TheAutomatingMrLynch

Hi, I am fairly new to Giraffe and the view engine but I like it very much so far. I have however been facing something that seems to be a bug with forms not having a close tag when rendered. To be honest I do not know whether this is an issue with Giraffe or the view engine.

Steps to replicate:

  • Add following F# code to a view:
div [_id "page-column-1"] [
    form [_class "add-form"] [
        label [_for "name" ] [ str "Name: " ]
        input [_type "text"; _id "name"; _name "name" ] 
        input [_type "submit"; _value "New" ] 
    ]

    form [_class "add-form"] [
        label [_for "name2" ] [ str "Name2: " ]
        input [_type "text"; _id "name2"; _name "name2" ]
        input [_type "submit"; _value "Copy" ]
    ]
]
  • Run your application and locate the forms in raw HTML:
<div id="page-column-1">
	<form class="add-form">
		<label for="name">Name: </label>
		<input type="text" id="name" name="name">
		<input type="submit" value="New" />
		<form class="add-form">
			<label for="name2">Name2: </label>
			<input type="text" id="name2" name="name2">
			<input type="submit" value="Copy" />
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions