Skip Navigation

[Gelöst] Dynamic default value for the edit user CRED form field

This support ticket is created vor 3 Jahren, 2 Monaten. 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.

Dieses Thema enthält 1 Antwort, hat 1 Stimme.

Zuletzt aktualisiert von cassianS vor 3 Jahren, 2 Monaten.

Author
Artikel
#2170375

Tell us what you are trying to do?
- I have a user edit form with generic fields where I want to display values from related custom posts where the user is an author.
- I am trying to display a value from the view as a default in the edit user generic text field, therefore user could see a field value
- unfortunately, the default value is not showing up as well as a field itself.

The view (with a value to display as default) content template has just a [wpv-post-title output="sanitize"] in it.
The option to "Disable the wrapping DIV around the View" is checked. The view itself is working well when placed on any page/post.

The generic field looks like this
[cred_generic_field type='textfield' field='generic-field-name']
{
"required":0,
"default":["[wpv-view name='the-name-of-the-view']"]
}
[/cred_generic_field]

- I also tried different options to display default value like:
- - "[wpv-view name='the-name-of-the-view']"
- - [[wpv-view name='the-name-of-the-view']]
- - [ [wpv-view name='the-name-of-the-view'] ]
- - [wpv-view name='the-name-of-the-view']

Is there any documentation that you are following?
- yes:
- - https://toolset.com/forums/topic/create-edit-form-which-combines-user-fields-and-several-custom-post-fields/
- - https://toolset.com/forums/topic/set-the-default-value-of-generic-cred-select-field-from-shortcode/

Is there a similar example that we can see?
- basically, the form fields should look like just edit user form fields or edit post forms fields when the current field value is prepopulated so the user can edit it.

What is the link to your site?
versteckter Link

ps. previously I was getting support from Christian and Shane so they should know already the website

#2170393

I found a solution.
When I turn the view to display results as a list with separators everything works fine.
But for some reason, it didn't work when I used the unformatted view display option.