• I have created an AWS (Amazon Web Services) Lightsail instance with WordPress Multisite 5.1.1-2 blueprint by Bitnami. I have updated WordPress to the most recent version, 5.2.2.

    I have created three WordPress blogs or sites on my multisite WordPress installation.

    I’m having the following problem with my non-primary WordPress blogs.

    In the WordPress post in a non-primary multisite WordPress blog, input text boxes are omitted for some reason, and they do not display at all, although they do get displayed on the primary WordPress blog.

    Using the Preview (post) button shows the input text box on the post preview page.

    Clicking the Preview button on the custom HTML block shows the input text box.

    However, the published post does not show the input text box.

    For example, the following HTML code in a custom HTML block does not show the input text boxes in the published post.

    <form>
      First name:<br>
      <input type="text" name="firstname"><br>
      Last name:<br>
      <input type="text" name="lastname">
    </form>

    When I use the inspect element feature in a web browser, the published post in the primary WordPress blog has the <input> HTML elements; however, the published post in the non-primary WordPress blogs has no <input> HTML elements, even though the exact same HTML code is entered in the custom HTML block for every WordPress blog.

    Why do the input text boxes appear only in the primary WordPress blog in the multisite WordPress network?

    How can this problem be rectified?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter asianamericanman1979

    (@asianamericanman1979)

    After doing some troubleshooting work, I realized that the problem was caused by different user privileges.

    While doing some more searching online, I came across the following page.

    https://wordpress.stackexchange.com/questions/75266/stop-wordpress-from-removing-html-attributes

    An entry on that page indicates that in multisite WordPress, if your’re not super admin, WordPress removes HTML attributes.

    If you want to keep HTML attributes, you should write and publish a post as a super admin user; otherwise, you’ll have your HTML attributes removed.

    This defeats the purpose of having the custom HTML block: as the name indicates, it should allow custom HTML code, instead of stripping the HTML tags.

    Another suggested solution is modifying the relevant WordPress code to prevent ‘sanitizing’ what the user entered—which, in my view, is too much work for allowing adding input text boxes in WordPress posts.

    So the current solution to this problem is creating posts using a super admin account, but I feel that this isn’t an elegant solution at all: admin and author users should be able to simply add form HTML code using the custom HTML block.

Viewing 1 replies (of 1 total)

The topic ‘Multisite WordPress not display input text box in the form HTML element’ is closed to new replies.