Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suave Experimental Form select-input

Tags:

f#

suave

I'm extending the tutorial at http://vgaltes.com/suave/forms-with-suave-experimental-and-suave-forms/ to support a HTML select-input/drop down list.

divAttr ["class", "editor-field"] [
  input (fun f -> <@ f.Name @>) [] Forms.human
]

The problem is that divAttr expects a Xml type, but Suave.Form.input returns a Node. Does anyone know how to solve this or have an example of how to do a select-input that can be added to divAttr?

I have looked at one example of how to do this, from the Suave Music Store book. But that seems to be outdated, and not relevant to the latest version of Suave.

I'm running Suave & Suave.Experimental 2.1.0.

Thanks!

like image 231
J du Preez Avatar asked May 05 '26 03:05

J du Preez


1 Answers

The latest version of Suave and Suave.Experimental (2.1.1) the code is div, not divAttr, and div expects a Node so I believe that'll fix your issue.

like image 86
JosephStevens Avatar answered May 06 '26 22:05

JosephStevens



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!