Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting properties on a form control when using the form builder #3195

Open
dereke opened this issue Nov 15, 2024 · 1 comment
Open

Setting properties on a form control when using the form builder #3195

dereke opened this issue Nov 15, 2024 · 1 comment
Assignees

Comments

@dereke
Copy link

dereke commented Nov 15, 2024

I am trying to use the autocomplete component from within a form builder:

class MyForm < ApplicationForm
  form do |form|
    form.auto_complete(
      name: :skills,
      label: "Skills",
      placeholder: "Search skills library",
      required: true,
      list_id: "skills_autocomplete",
      src: "/skills/autocomplete?select_fields=id,name,description&search_field=name",
    )
  end
end

This renders a FormControl with the autocomplete inside and that is all great. However I want to set the form control to be full width. There is a property for this available on the form control but that seems to be inaccessible from here.

Is there a way to modify the values passed to the form control so we can set properties on it?

Thanks for your help

Copy link
Contributor

Uh oh! @dereke, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

🤖 Beep boop! This comment was added automatically by github/accessibility-alt-text-bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants