Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] Add fields on the fly

  • Hi all,

    I would like to create a form where users can add a certain field on the fly while filling out the form.
    I am using CF7 for a report style form, where users can submit data into a textfield and send it to me.

    But, if they have more than one data entry they should be able to add additional fields.

    I know how to add the fields with js (basically just cloning the initial field), but how do I get CF7 to display the added fields in the mail report, when CF7 isn’t ‘aware’ of the fields to begin with?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi


    How about adding normal text fields and ‘display: none’ style, then adding JS that switches show/hide of the fields?

    I mean,

    In your form:
    [text your-text-a class:hidden]

    In your CSS stylesheet:
    .hidden { display: none; }

    In your mail:

    Hi Takayuki,

    Thank you for your reply.

    Yea, that’s actually a good idea.

    Only problem is of course having enough fields available then, without creating mails that contain 50 empty lines each time..
    Can you make it so in the report email that the field is only parsed if it contains content?

    Thanks, cb

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Contact Form 7] Add fields on the fly’ is closed to new replies.