-1

I'd like to auto populate a form / Text area with the post content !

For Example : The link below has got a link which take it to the form !

http://cozysms.com/passenger-tumne-mere-jeb-me-hath/

When somebody click at the link - Send Sms Now just below the social buttons it will take it to the form -

http://cozysms.com/send-free-sms/

I want to auto populate the form with - the_content() of the www.cozysms.com/passenger-tumne-mere-jeb-me-hath/

Similarly for other articles. Is this doable?

0
add_filter( 'comment_form_defaults', 'bootstrap3_comment_form' );

function bootstrap3_comment_form( $args ) {
    $args['comment_field'] = '<div class="form-group comment-form-comment">
    <textarea class="form-control" id="comment" name="comment" cols="45" rows="8" aria-required="true" placeholder="' . __( 'Comment', "beautiful" ) . '"></textarea>
</div>';
return $args;
}

fetch your content and put it inside textarea tag.

you should add this function to your functions.php it's better to change name of the function and language text domain.

this function override WordPress default textarea of comment section. it's also with bootstrap 3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.