Skip Navigation

[Resolved] Allow members to edit their member profile

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to have their customer's edit their own content on the frontend.

Solution:

This can be done by creating a frontend edit form and following the instructions in the link below.
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 62 replies, has 2 voices.

Last updated by laurieB 5 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1182432

Hi Shane,

Completed a new member profile. It did not show selected. Food & Drink and winery were selected. OMG, so close!

#1182433

Shane
Supporter

Languages: English (English )

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

Hi laurie,

I checked on this again and it seems the only step you are missing now is to replace the value attribute of your Taxonomy selections on the form with their ID.

In order for this to work .

Example you had this.


{"value":"animal-care","label":"Animal Care"}

However it should be.

{"value":"14","label":"Animal Care"}

So you need to change all of them to their respective ID which can be found by editing the term on the backend and looking at the tag_ID attribute in the url for the ID.

Thanks,
Shane

#1182443

HI Shane,

I did change them in the edit, but not the form.

Will I need to change these instances also?

[cred_show_group if="( $(gen-biz-category) eq 'animal-care' )" mode="fade-slide"]
<div class="profile-biz-cat-sub">
        <label>Sub-Category:</label> 
  [cred_generic_field field='animal-care' type='select' class='form-control' output="bootstrap"]
{
"required":0,
"default":[],
"options":[{"value":"dog-walker","label":"Dog Walker"},
      {"value":"pet-caretaking","label":"Pet Caretaking"},
      {"value":"pet-grooming","label":"Pet Grooming"},
      {"value":"pet-supplies","label":"Pet Supplies"},
      {"value":"veterinarian-services","label":"Veterinarian Services"},
      {"value":"training-services","label":"Training Services"},
      {"value":"alternative-cremation","label":"Alternative Cremation"}]
}[/cred_generic_field]
[/cred_show_group]
#1182448

Shane
Supporter

Languages: English (English )

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

Hi Laurie,

Yes you will need to change all of them. This is because the wordpress function to add them to the posts only accepts the ID as a value and not the slug.

Thanks,
Shane

#1182468

Hi Shane,

I have changed all the fields in the form, to the appropriate slug. The main biz category is checked, but not the sub-category. What am I missing? Here's one of the fields.

[cred_show_group if="( $(gen-biz-category) eq '18' )" mode="fade-slide"]
<div class="profile-biz-cat-sub">
        <label>Sub-Category:</label>   
  [cred_generic_field field='18' type='select' class='form-control' output="bootstrap"]
{
"required":0,
"default":[],
"options":[{"value":"advocate-for-children","label":"Advocate For Children"},
{"value":"child-care","label":"Child Care"},
{"value":"clothing","label":"Clothing"},
{"value":"furnishings","label":"Furnishings"},
{"value":"parenting-resource","label":"Parenting Resource"},
{"value":"tutoring","label":"Tutoring"}]
}[/cred_generic_field]
[/cred_show_group]
</div>
#1182506

Hi Shane,

The category is used for category search, and the sub-category is listed under each members photo in the archive directory, and the member profile. So they both need to show up.

Laurie

#1183608

Hi Shane,

I've also tested one of the sub-categories, swapping the ID for the slug to see if that would work. No luck! Would appreciate your help please. I have no idea how to move forward. I"m stuck.

Thank you,
Laurie

#1183609

Shane
Supporter

Languages: English (English )

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

Hi Laurie,

For the sub categories you need to use the ID and NOT the slugs as the slugs do not work in the function that is used to set the category to the post.

Similarly to what we did for the parent categories, you need to do this for the child ones as well.

I took a look at the code and i see you've been miss interpreting a bit.

[cred_generic_field field='18' type='select' class='form-control' output="bootstrap"]
{
"required":0,
"default":[],
"options":[{"value":"advocate-for-children","label":"Advocate For Children"},
{"value":"child-care","label":"Child Care"},
{"value":"clothing","label":"Clothing"},
{"value":"furnishings","label":"Furnishings"},
{"value":"parenting-resource","label":"Parenting Resource"},
{"value":"tutoring","label":"Tutoring"}]
}[/cred_generic_field]
[/cred_show_group]

I see that you've changed the field attribute to 18. This is incorrect, you need to restore it to its original field name as the custom function is using the field name to get the selected value. This will break the custom function if their original field attribute name is not restored.

What should get the slugs changed to ID's are the option values. These

"options":[{"value":"advocate-for-children","label":"Advocate For Children"},
{"value":"child-care","label":"Child Care"},
{"value":"clothing","label":"Clothing"},
{"value":"furnishings","label":"Furnishings"},
{"value":"parenting-resource","label":"Parenting Resource"},
{"value":"tutoring","label":"Tutoring"}]

Similarly to what you did for the parent category

options":[{"value":"14","label":"Animal Care"},
      {"value":"15","label":"Arts & Literature"},
      {"value":"16","label":"Beauty & Spa"},
      {"value":"17","label":"Care Coordinator"},
      {"value":"18","label":"Children's Needs"},
      {"value":"19","label":"Diversity/Multi-Cultural"},
      {"value":"20","label":"Education"},
      {"value":"21","label":"Fashion"},
      {"value":"22","label":"Food & Drink"},
      {"value":"23","label":"Goods & Retail"},
      {"value":"24","label":"Health & Wellness"},
      {"value":"25","label":"Home & Garden"},
      {"value":"60","label":"Legal & Financial"},
      {"value":"26","label":"Non-Profit"},
      {"value":"28","label":"Professional Services"},
      {"value":"30","label":"Real Estate"},
      {"value":"31","label":"Technical Services"},
      {"value":"32","label":"Travel"},
  	  {"value":"33","label":"Venue"}]

Please let me know if this is clear or if there is anything that you are unsure about.
Thanks,
Shane

#1183612

Hi Shane,
Thank you, I knew something didn't seem right. Is this correct?

[cred_show_group if="( $(gen-biz-category) eq '18' )" mode="fade-slide"]
<div class="profile-biz-cat-sub">
        <label>Sub-Category:</label>   
  [cred_generic_field field='childrens-needs' type='select' class='form-control' output="bootstrap"]
{
"required":0,
"default":[],
"options":[{"value":"246","label":"Advocate For Children"},
{"value":"160","label":"Child Care"},
{"value":"224","label":"Clothing"},
{"value":"225","label":"Furnishings"},
{"value":"247","label":"Parenting Resource"},
{"value":"223","label":"Tutoring"}]
}[/cred_generic_field]
[/cred_show_group]
</div>
#1183618

Shane
Supporter

Languages: English (English )

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

Hi Laurie,

Yes this is absolutely correct 🙂

It should start working now.

Thanks,
Shane

#1183648

Hi Shane!

Wahoo!! Thank you so much. New member profile created, category & sub-category show up as expected.

I have one more question about this. Is it possible to have a field to add a new sub-category? So if a member chooses Food & Drink and they are a wine taster, and there isn't a category that really fits, could there be a field to add a new sub-category, that posts the same way to the back-end and on the profile page?

Thinking this may come up.

Thank you so much for your help!!

#1183698

Shane
Supporter

Languages: English (English )

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

Hi Lauire,

What you can do is to add it as another child category with the Food and Drink child category being its parent.

Then we can just add it using code. So they wouldn't be able to select Wine Taster on their on but you want it to be automatic?

Please let me know.

Thanks,
Shane

#1183705

Hi Shane,

I'd like it to be automatic. My client will NOT be digging in the code, so I want to make it easy for her. If a member can add on their own, similar to how the multi-select allows you to add, that would be great. Another option might be add other and conditionally have a field to enter text, then the client can add and it will be visible. Thoughts on best way?

#1183709

Shane
Supporter

Languages: English (English )

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

Hi Laurie,

Would the other terms have such a category as Wine Taster ? Or is this the only additional option that you want to have.

Thanks,
Shane

#1183717

Hi Shane,

No that is just an example. I want it to be a free space to type what you need if you can't find something that fits your business.