<p></p>
<p>So we have two options - <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="636904039" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2655" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2655/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2655">#2655</a> (using the <code>simple_form</code> gem) and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="644746618" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2667" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2667/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2667">#2667</a> (using the <code>bootstrap_form</code> gem). Overall there's not much to choose between them, but as I said in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="644746618" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2667" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2667/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2667">#2667</a> I lean slightly towards the bootstrap_form option.</p>
<p>Today I've been tackling integrating the richtext input (that we use in diary entries and elsewhere). This would be nice to have as a custom input, so that we could do <code>f.richtext_field :body</code> and get the label, textarea, help, preview buttons etc automatically. After a bit of trial and error I <a href="https://github.com/gravitystorm/openstreetmap-website/commit/aeaf0404e7d805871b7fe3c4252adec92223d2b9">found a way</a> that works reasonably well.</p>
<p>Unfortunately bootstrap_form doesn't appear to have any way to develop custom inputs, either from scratch (e.g. <code>f.richtext_field :body</code>) nor by options (e.g. <code>f.textarea :body, as: :richtextarea). I settled on creating a custom formbuilder, as in the linked commit, and it works well enough but still feels a bit clunky. The only relevant issue that I found was https://github.com/bootstrap-ruby/bootstrap_form/issues/139 . </code>simple_form`, as linked to in that issue, supports a number of nice methods to create custom inputs and other customisations.</p>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/tordans/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tordans">@tordans</a> do you have any experience with custom inputs like this?</p>
<p>Overall it's not a showstopper, so we can definitely move forward with bootstrap_form, but it would be nice to see if there's a smoother way to do the richtext fields.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2654#issuecomment-652432302">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKV57SPVTWEJXXMZCLRZM5WRANCNFSM4N3I2EZQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLMWBOZ7OCJOVX7KYXDRZM5WRA5CNFSM4N3I2EZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE3RVHLQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2654#issuecomment-652432302",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2654#issuecomment-652432302",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>