Closed teguh87 closed 6 years ago
Hi @teguh87 one of our core Give developers ( @ravinderk ) provided this snippet for that purpose:
function give_add_multipart_tag_donation_form( $final_output, $args ) {
$form_tag = "<form id=\"give-form-{$args['form_id']}\"";
$final_output = str_replace( $form_tag, "{$form_tag} enctype=\"multipart/form-data\"", $final_output );
return $final_output;
}
add_filter( 'give_donate_form', 'give_add_multipart_tag_donation_form', 10, 2 );
Try that out and let me know how it goes. Thanks!
@mathetos can we move code to the snippet and close this issue?
@ravinderk I added here: https://github.com/WordImpress/Give-Snippet-Library/blob/master/form-customizations/multipart-form.php
If you have inline Docs improvements on that, that would be appreciated.
Please help me for customizing give donation form, I Only want add multipart/form-data for uploading attachment in Form Donation. I has using some example for upload wordpress
add_action('post_edit_form_tag', 'post_edit_form_tag'); function post_edit_form_tag() { echo ' enctype="multipart/form-data"'; }
But the form still does not have multipart/form-data tag.
Please Help me!