Joomla XML form display user information?

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
waltsjt
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Thu Jun 12, 2014 10:44 pm

Joomla XML form display user information?

Post by waltsjt » Mon Apr 20, 2015 10:34 pm

Coding Question: How do you display user information in an Joomla xml form after selecting the user via the field type type="user"
I've looked at a lot of tutorials but nothing seems to broach this subject.

Basic concept I'm working on is to select the user and show the user name and email in the form:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<form>
	<fieldset>
		<field name="user_id" type="user"       
    	            label="COM_MYCOMPONENT_FORM_LBL_USER_USER_ID"
	            description="COM_MYCOMPONENT_FORM_DESC_USER_USER_ID" 
                    required="true"  /> 
		<field name="username" type="text"
    	            label="COM_MYCOMPONENT_FORM_LBL_USER_USER_NAME"
	            description="COM_MYCOMPONENT_FORM_DESC_USER_USER_NAME"
	            />
                <field name="user_email" type="text"
    	            label="COM_MYCOMPONENT_FORM_LBL_USER_USER_EMAIL"
	            description="COM_MYCOMPONENT_FORM_DESC_USER_USER_EMAIL"
	            />
	</fieldset>
</form>
What modifications are needed to have the form dynamically show the selected user's information in the form?

Thanks for your help and guidance in this topic.

Locked

Return to “Joomla! 3.x Coding”