Support » Plugin: Contact Form 7 » No form Name on the forms Contact Form 7 generates

  • Within the file – contact-form-7/includes/classes.php

    and function form_html()

    we have the line:

    $form .= ‘<form action=”‘.esc_url_raw($url).'”method=”post”‘.’ class=”‘.esc_attr($class).'”‘.$enctype.’>’.”\n”;

    We need to have a unique name for our forms which would be great to have as an extra field on the front end to set a custom name.

    If not could we use the $this->unit_tag variable from the line:

    $form = ‘<div class=”wpcf7″ id=”‘ . $this->unit_tag . ‘”>’;

    If we add the bit of code name=”‘.$this->unit_tag.'” after the open form tag it will work.

    $form .= ‘<form name=”‘.$this->unit_tag.'” action=”‘.esc_url_raw($url).'”method=”post”‘.’ class=”‘.esc_attr($class).'”‘.$enctype.’>’.”\n”;

Viewing 1 replies (of 1 total)
  • Hi Takayuki,

    Has anyone else had this problem?

    It would be good if this could be implemented in the next release?

Viewing 1 replies (of 1 total)
  • The topic ‘No form Name on the forms Contact Form 7 generates’ is closed to new replies.