• 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 6 replies - 1 through 6 (of 6 total)
  • 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!

    Thread Starter webdiak

    (@webdiak)

    Thank you, that works perfectly!

    Thread Starter webdiak

    (@webdiak)

    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?

    Hello All;

    I have this same need – I read this thread and the replies – but I must be having a ‘brain blackout’ – granted, I am an experienced programmer but not in the WordPress/Plug-In circles…

    In some way, shape or form I simply need to put the logged in user (ID, Firstname, Lastname, email – any – just one of them) into the results array.

    I read here about the {{user.user_login}} approach but I cannot make it happen. It says it can included in the ‘value=’ clause(s) but that doesn’t work…

    I have tried it with things like … value= … with ”, “”, [], and other …

    I have tried the same using it within TEXT, CHECKBOX, RADIO and beyond – but still no success…

    I have tried different clean browsers, creating different simple users in WordPress and more …no success…

    The site is all new – reputable web-host, self-installed WordPress, very simple ‘whole page’ template, not plug-in mess or clutter.

    Every other thing works as I would expect – I already have ‘step-based’ form, clean answers going out to the results array and can handle them.

    I’d have no problem paying for the upgrade or support if I knew this could be handled – the project is for an old and established non-profit organization but they have no technical volunteers – so I am it at the moment.

    I’d appreciate any suggestions that you folks have…

    Regards,
    BOB

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘User name in form’ is closed to new replies.