Options/Checkbox Limit custom SVG

Created on 27 February 2024, 4 months ago
Updated 5 April 2024, 3 months ago

Problem/Motivation

I tried to use a custom option (SVG) and limit the values as it was in the t-shirts list demo. On the administration page under Options/Checkbox limit, I don't see the options to set the desired quantity. The SVG works perfectly; I have set it to accept unlimited values and I wanted to limit the value per entity.

Steps to reproduce

Could you please give me an idea of what I can do? Thank you very much! Have a great day!

πŸ› Bug report
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue was unassigned.
  • πŸ‡³πŸ‡΄Norway gisle Norway

    Unassigning bonus assignment.

  • Status changed to Postponed: needs info 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cilefen

    Bug reports need steps to reproduce.

    Also asked as https://drupal.stackexchange.com/questions/319473/could-someone-assist-m...

  • For this project, I used the Webform module version (6.2.2) and all its activated submodules. I will attach my SVG file, which will be in the zip file, so you can test it with the SVG seen in the video clip.
    1. Firstly, navigate to "admin/structure/webform/options/custom/manage" and add a custom option named "SVG."
    2. Configure the custom options as follows:
    - Category: Maps
    - Template
    - Type: URL
    - HTML/SVG file URL or path: "/sites/default/files/svg/hghg.svg" (I have placed the SVG file here)
    - Option value attribute names: id
    - Option text attribute names: id
    - Check "Allow SVG option elements to be filled using CSS" and "Enable SVG panning and zooming."
    - Leave unchecked "Show select menu associated with the custom options element" and "Display option text and description in a tooltip."
    - Under Integration, check only "Use as a basic select element" and save.
    3. Then, navigate to "/admin/structure/webform" and create a new webform named "test."
    4. Add the previously created element by clicking "+Add element" and selecting SVG (from the Custom elements category).
    5. Configure the element settings as follows:
    - Title: Test
    - Allowed number of values: Unlimited
    - Form validation: Check "Unique" and "Unique per entity"
    - Save the element.
    6. After that, go to "admin/structure/webform/manage/test/settings," then navigate to Emails/Handlers, and add a handler called "Options/Checkbox limit."
    7. Configure the handler settings as follows:
    - Title: Options/Checkbox limit
    - Element settings: Element: Test (SVG) [Here, selectable options and limitations for each element from SVG should appear. This is where I encounter the issue.]
    8. After saving the handler, attempt to test the webform at "webform/test/test." However, an error occurs: "The website encountered an unexpected error. Try again later." The specific error encountered is attached here.After deactivating the limiting handler, it reverts back to its initial state, meaning the SVG file is selectable, and so on.
    Thank you !

  • Status changed to Closed: won't fix 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    This feels like a support request. I don't have to resources to debug custom code/implementation

Production build 0.69.0 2024