WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
excel file attachment (3 posts)

  1. budskab
    Member
    Posted 1 year ago #

    Hi

    I need to be able to let people upload .xls files through the contact formula..

    I've found that this is possible through adding xls to the standard file list

    /* File type validation */
    
    	// Default file-type restriction
    	if ( '' == $file_type_pattern )
    		$file_type_pattern = 'jpg|jpeg|png|gif|pdf|doc|docx|ppt|pptx|odt|avi|ogg|m4a|mov|mp3|mp4|mpg|wav|wmv|xls';
    
    	$file_type_pattern = trim( $file_type_pattern, '|' );
    	$file_type_pattern = '(' . $file_type_pattern . ')';
    	$file_type_pattern = '/\.' . $file_type_pattern . '$/i';

    contact-form-7/modules/file.php

    So it isn't impossible, but, is there a way to make this change permanent (I guess updating the plugin will erase my changes).

    Thanks in advance,
    Mark

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

  3. budskab
    Member
    Posted 1 year ago #

    But it doesn't seem to me that it says anywhere how to make .xls files a part of the accepted file types ... it doesn't work just adding the file type to generated tag in the Contact Form 7 admin panel

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic