Support » Plugin: HTML Forms » User name in form

  • Resolved webdiak

    (@webdiak)


    Hi there, great plugin, I like it a lot.
    I would need however to have the username of registered users who fill in the form, because later I want to group and display submissions this way. I didn’t find usernames registered in the database, only date and IP-addresses.
    Is there any way to solve this?
    (I even thought of inserting it as default value if there was any shortcode that would work in HTML.)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Webdiak,

    You can use the template tag {{user.user_login}} to show the username in your forms. This template tag can also be used inside the value="" attribute of your input fields.

    https://kb.htmlforms.io/template-variables/

    Hope that helps!

    Thank you, that works perfectly!

    Also I could use the html hidden attribute so the field registers user name not even being visible for users.

    Hello…I think HTML Forms is a very promising plugin (I searched several and found them too complex for non-developers).

    I am using Divi theme and use wpdatatables. I need to create a table using shortcode where some of the shortcode parameters are taken from user input (HTML Forms).

    The final step to produce a wpdatatables will be with this shortcode on the page that produces table with id=1 and take a parameter var1 set in the form completion process:

    echo do_shortcode(“[wpdatatable id=1 var1=$Name]”);

    I need to determine how var1 is set to a field capture from the form, say first-name.

    Any guidance on how to set this up would be greatly appreciated!

    Thanks

    Thank you @dvankooten

    Variables can be such a big help to make forms more dynamic.

    Is it possible to add these variables to the content body of the email sent?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.