frontity-contact-form-7 icon indicating copy to clipboard operation
frontity-contact-form-7 copied to clipboard

feature/add-field-support: Add support for all cf7 fields

Open imranhsayed opened this issue 5 years ago • 6 comments

Add support for all cf7 fields

imranhsayed avatar Oct 26 '19 12:10 imranhsayed

Add support for:

  1. Checkbox
  2. Multiselect
  3. Textarea
  4. Quiz etc

imranhsayed avatar Oct 31 '19 14:10 imranhsayed

I'd like to help work on the Checkbox form, if possible? I need it for a project I'm working on and would like to help, but I'm not sure how!

minnifer avatar Dec 16 '19 00:12 minnifer

@imranhsayed could you please help @minnifer to contribute to the package with support for the checkbox?

luisherranz avatar Dec 24 '19 18:12 luisherranz

Hi @luisherranz , I am preoccupied with a lot of work lately. Just had a look at your message. We will certainly help @minnifer to add support for checkboxes as soon as I get free. Thank you 😊

imranhsayed avatar Dec 31 '19 05:12 imranhsayed

hi @imranhsayed

Add support for:

  1. Checkbox
  2. Multiselect
  3. Textarea
  4. Quiz etc

vote for files upload here. :)

dejangeorgiev avatar Sep 24 '20 17:09 dejangeorgiev

@dejangeorgiev , @minnifer , and @imranhsayed , I have started a PR at https://github.com/imranhsayed/frontity-contact-form-7/pull/37. It doesn't provide full functionality for checkboxes but it will allow singular option checkboxes (without default checking) to work. This works for my usage at the moment but it needs to be fleshed out:

My guess is that in the cf7Checkboxes processor, we want to actually test for the wrapper class and then iterate over the options inside that and add them to an array for that input's name when they are checked. This would be similar to how the Select component is built out using .map() on the inputProps.options. If an array is too hairy to use directly in the submission, perhaps it's easier to use .join() and .split() either in submission or in the onChange() handler within the Checkbox component, which is possible because the values are very predictable. I just foresee an issue if someone wants to use "," (or whatever we use to combine the array items e.g., "|") in a singular option and we are .join()ing or .split()ing on that separator...

davidrhoderick avatar Nov 20 '20 14:11 davidrhoderick