Copybutton in forms | WordPress.org

[ad_1]

Hey @marlos71 ! ๐Ÿ‘‹

For feature requests, please visit our Discord server, where you can submit your own ideas and vote for the features you prefer. ๐Ÿ˜Š

In the meantime, you can manually add a button. To assist you, Iโ€™ve included a quick workaround to copy the value from the form output.

let copyFormOutput = () => {
    const output = document.querySelector('.mwai-form-output');

    // Create a temporary textarea element
    const buffer = document.createElement('textarea');
    buffer.value = output.innerText;
    document.body.appendChild(buffer);

    // Select and copy the text
    buffer.select();
    document.execCommand('copy');

    // Remove the temporary textarea element
    document.body.removeChild(buffer);
};

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer