• Hello,
    i want to put a textarea here instead of simple text input in admin backend :
    Image admin text

    I find the text input way too small and restrictive for admin.
    What would be the way ?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hello rev,

    This is set as a text input and there is no built-in option to change it to a textarea.

    That being said, if you’re comfortable with modifying the template, the plugin does come with a feature that lets you customize any of the included layout templates by creating your own template files. This is mostly meant to allow you to code your own customization for the front-end output. However, we do include templates for the order edit screen, which can be customized as well.

    This would give you a non-destructive way to make the change you want. To do this:

    1. You can get to the templates folder by opening your site via FTP and navigating to /wp-content/plugins/order-tracking/ewd-otp-templates

    2. In that folder, you can find the template file you would like to edit and download it to your computer.

    3. Modify the file with the updated or new code you would like to add.

    4. In the root folder of your active (child) theme, create a new folder called “ewd-otp-templates”

    5. Upload your modified file to this folder in your theme.

    The plugin will automatically use any templates with the same name found in the “ewd-otp-templates” folder in your active theme.

    You can view our full tutorial with screenshots for the Ultimate FAQ plugin here: https://www.etoilewebdesign.com/2021/10/21/how-to-edit-a-template-wordpress-plugins/

    The process is the same for the Order Tracking plugin. The only difference is the name of the templates folder. For Order Tracking, it is: “ewd-otp-templates”

    And the template you would want to modify is “admin-order-form.php”

    Thread Starter reVwow

    (@revwow)

    Hello,
    thanks a lot for informations.
    I managed to do it. Now i have a textarea in admin order page.
    But i have few details i want to fix now :

    1- it seems “line break” doesnt work. When i put text in textarea in admin back-end with line break (that was the point to put textarea instead of simple input text), on result in front-end, i have all the text in same line still.

    See here : Picture 1
    picture 2

    2- When i put some text in public note on order in back-end admin, the result is displaying in front-end for client but if i go back to admin backend all the text doesnt display anymore of what i typed before.

    Exemple here : gif anim

    Regards

    • This reply was modified 2 years, 10 months ago by reVwow.
    Plugin Support jaysupport

    (@jaysupport)

    Hello rev,

    Regarding issue 1, it looks like you will also need to create your own custom template of the order-results.php file, and modify it to allow the HTML tags, etc. that you require.

    Regarding issue 2, this is only happening after you changed the template? Did you add a value field to your textarea and make it display the saved content?

    The template customization is meant for more advanced users who have some understanding of coding and feel comfortable making the changes. While we do provide this avenue for you to be able to customize the code, we cannot help with or do customization for you.

    Thread Starter reVwow

    (@revwow)

    Hello,
    thanks for answer.
    For issue 1, am gonna look into it on my own.

    For issue 2, i have this :

    <textarea name=”ewd_otp_public_notes” style=”width: 300px;” value=”<?php echo ( ! empty( $this->order->notes_public ) ? esc_attr( $this->order->notes_public ) : ” ); ?>”></textarea>

    .
    And for some reason it dissapearing after save and refresh. But the text is still displaying in front-end result.

    Also i have a issue 3, about special caracters like : ‘ (ex : l’année). on Front end it goes into a / (ex : l/année). Something with UTF-8 ?

    Reagards

    Plugin Support jaysupport

    (@jaysupport)

    Hello rev,

    For issue 2, as mentioned, we cannot help you to do the actual customization. We explain the process and provide the ability for you to customize it, but we cannot do plugin customization for you. That falls out of the scope of our support.

    Regarding issue 3, it looks/sounds like the characters you are using are getting escaped. So you can either update the escaping function used in your modified template, or you could try using the equivalent HTML entities instead. For example:

    l&#039 ;année

    (There is no space before the semi-colon. I just put it that way so it would not be rendered here.)

    • This reply was modified 2 years, 9 months ago by jaysupport.
    • This reply was modified 2 years, 9 months ago by jaysupport.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Put textarea instead of input text in admin’ is closed to new replies.