-
Hi there!
I’ve a custom field called “battletag” in userpro profile where users enters an information like “Blabla#4587”
On my site i’ve a submit form with an input text and the default value is “MyBattleTag#1234”
I use this code
<input id="d3a_btag" type="text" value="MyBattleTag#1234" />
I want to get the information of the logged user from the custom field “battletag” to put by default his own battletag instead of “MyBattleTag#1234”
How can I do this ? 😀
Thanks a lot, and as usual please forgives my bad english
😀 Wow I didn’t understand a thing from your request. I do not know even if it can be done without using hooks, what are you trying to do ? 🙂
Ok I will use examples 😀
I’ve a custom field called “Custom field”. This field is for simple text, so users can put some text in this field. What I want is to display this text in another place.
In my case it’s to use in a submit form. For example imagines that the custom field is “Town” and the user enter “Paris”. I want that when the user go on the form, “Paris” is already put as default value in “Town” field 🙂
I hope it’s understandable now :’D
Ah you want to set DEFAULT VALUE of custom field in your registration/profile form?
No 😀 I want to REPLACE default value of a text area by the value entered by the user in the custom field !
I’ve a text area on my website, users can enter a text and submit with a submit button beside the text area. Currently in the text area we have “Blablabla” by default (if user doesn’t enter text). I want to replace “Blablabla” by the text entered by the user in the custom field on his profile.
Currently my text area is :
<input id="d3a_btag" type="text" value="Blablabla" />
How can I replace “Blablabla” by the text entered by the user in his profile ?
Thanks 😀
Oh my .. You want to validate his input after form is processed?
I just want to make it as a suggestion.
I’ve made a screen for explain more clearly :
As you can see, by default in the form it’s “MyBattleTag#1234”. I want to replace “MyBattleTag#1234” with what the user entered in the custom field profile.
In other words : how can I show what user entered in a specific field ?
userpro_profile_data(‘custom_field_key’, $user_id); in php 🙂
Thanks a lot Ahmed 🙂 And how can I replace $user_id by the user who is logged in ?
In this case when the user want to enter his information in the field, this is already entered.
You must be logged in to reply to this topic.