Q: transform input field in textarea I have a form. Within this form, I have an input field. I want to change some input field in the text area. I receive this form from an external source, so I can't change the html. How make this in js/jquery?
This is an example: 
<label for="MMERGE12" class="MMERGE12-label"><span class="MMERGE12-label">categorie trattate</span>
                                                                        <input id="yikes-easy-mc-form-1-MMERGE12" name="MMERGE12" placeholder="" class="yikes-easy-mc-text" type="text" value="">

                                    <!-- description -->
                                    <p class="form-field-description"><small></small></p>                                   
                                                                        </label>

SOLVED WITH THIS CODE :
var input    = document.getElementById('yikes-easy-mc-form-1-MMERGE12'),
    textarea = document.createElement('textarea');
textarea.id    = input.id;
textarea.cols  = 40;
textarea.rows  = 5;
textarea.value = input.value;
textarea.name = input.name;
input.parentNode.replaceChild(textarea, input);


A:     //Create a new textarea
    var textarea = jQuery("<textarea></textarea>");

    //Select the input 
    var input = jQuery("#yikes-easy-mc-form-1-MMERGE12");

    //Asign the value, id, name from the input to the textarea
    textarea.val(input.val());
    textarea.attr('id', input.attr('id'));
    textarea.attr('name', input.attr('name'));
    //You can copy any other attribute you like here

    //Finally do the replacement
    input.reaplceWith(textarea);

you will probably need to wrap this in ready wrapper jQuery(document).ready(function() { /* code here */ }) if you do it on load or if you load it with ajax just execute this code after the data has been attached to the DOM 

A: Try this
$(document).ready(function () {
        var input = $("#yikes-easy-mc-form-1-MMERGE12");
        var textArea = $("<textarea></textarea>").attr({
            id: input.attr("id"),
            name: input.attr("name"),                    
            value: input.val()
        });
        // class is set separately because "class" is a reserved word ...
        textArea.attr("class", input.attr("class"));
        //insert textarea right after original input, and remove input
        input.after(textArea).remove();
});

