Skip Navigation

[Resolved] How to add a field to upload a profile picture using CRED form

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by puneetS-3 4 years ago.

Assisted by: Shane.

Author
Posts
#1547115

I have created a form to edit an existing user using User Forms. I have also created a page to display the user's dashboard where I want to show the profile picture of the user.
Is there any way to add a field to upload an image from front end. so, that a user can add or edit his/her image?

#1547497

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for getting in touch.

Yes there is. All that is needed is to go to Toolset -> Custom Fields and create a custom field group for users and then add the image custom field to the user field group.

Then go to your Edit form on the backend and drag the image field that you've created onto the edit form and save it. Once this is done correctly then your image should show up on the frontend.

Thanks,
Shane

#1547685

Hi Shane,
I have created an Image custom field to the user field group and a cred form having only two fields one is the image custom field and another one is the upload button.
Then I added this form to my Page [named as 'Account Settings']from where users can able to edit their profile and I also added the custom image field to a page[named as Users Dashboard] to display the profile picture of the user to their dashboard.

I'm expecting that the user can upload the image on the front-end at Account setting Page and it will be displayed on its Dashboard or he/she can also be able to update their profile picture whenever they want.

What I added in my cred form where profile-picture is the custom image field to the user field group:

[creduserform]
	<div class="form-group">
		[cred_field field='profile-picture' force_type='field' class='form-control' output='bootstrap']
	</div>
		[cred_field field='form_submit' output='bootstrap' value='Upload' class='btn btn-primary btn-lg']
[/creduserform] 
#1548679

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I'm expecting that the user can upload the image on the front-end at Account setting Page and it will be displayed on its Dashboard or he/she can also be able to update their profile picture whenever they want.

Yes they will be able to. Not sure why you've created a separate form with just the image field but this field can be added to the main form that you use to edit their profile. Just copy and paste this code to that form.

<div class="form-group">
        [cred_field field='profile-picture' force_type='field' class='form-control' output='bootstrap']
    </div>

This should allow the field to show up on the main edit form.
Thanks,
Shane

#1549255

My issue is resolved now.
Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.