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

Closed
dereke opened this issue Nov 15, 2024 · 3 comments · Fixed by #3205
Closed

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

dereke opened this issue Nov 15, 2024 · 3 comments · Fixed by #3205
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.

@camertron
Copy link
Contributor

Hey @dereke, thanks for bringing this to our attention 😄 It should be mitigated by #3205 👍

@dereke
Copy link
Author

dereke commented Nov 22, 2024

Amazing - thanks so much! ❤️

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

Successfully merging a pull request may close this issue.

3 participants