Site icon Hip-Hop Website Design and Development

Auto-fill logged user username in the input area [duplicate]

I am trying to auto-fill the username in the input area when a logged user accesses the page.

Added PHP code on the plugins for calling the WordPress function.

<?php $current_user = wp_get_current_user(); ?>

Then I tried with HTML code following, but still, it did not work with auto-filling username.

<input id="asp-custom-field" name="'<?php echo $current_user->display_name; ?>" class="pure-input-1 asp_product_custom_field_input" type="text" data-asp-custom-mandatory="" placeholder="Hostboring.com account username" required="">

You may visit the link below for the live demo,
Thanks for your help
https://hostboring.com/asp-products/vps-lite/

You may use this demo account to login.
Username: demo
Password: demo