Skip Navigation

[Resolved] Add shotcode in edit user form

This support ticket is created 4 years, 4 months 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.

Our next available supporter will start replying to tickets in about 1.36 hours from now. Thank you for your understanding.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by WeiS2074 4 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1688019

Hi,

Is it possible to add shotcode in "edit user form"? I have a shotcode avatar_upload which works in post. but when I add it in edit user form it doesn't work. Below is the form html.

[creduserform]
<div class="form-group">
<label>Nickname</label>
[cred_field field='nickname' class='form-control' output='bootstrap']
</div>
<div class="form-group">
<?php echo do_shortcode("[avatar_upload]"); ?>
</div>
[cred_field field='form_submit' output='bootstrap' value='Submit' class='btn btn-primary btn-lg']
[/creduserform]

#1688623

Hello,

I assume [avatar_upload] shortcode will output a HTML form for user upload his custom avatar image.

According to W3C HTML standard, you can not put one HTML form into another HTML form, it is forbidden:
hidden link
but with no form element descendants.

So you can not embed other form into Toolset Forms, it won't work.

I assume you are going to customize user's avatar image.

This is possible with an custom user image field some custom codes, for example, below thread is for:
user can upload their image into custom user image field "user-profile-avatar" to replace user avatar:
https://toolset.com/forums/topic/replace-wp-profile-image-with-user-field-image/#post-1607793

For your reference.

#1688907

My issue is resolved now. Thank you!