Home › Toolset Professional Support › [Resolved] How do I change "No user specified" message on the toolset form to edit user?
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)
Tagged: Toolset Blocks, Views plugin
This topic contains 10 replies, has 2 voices.
Last updated by cantonB 4 years, 3 months ago.
Assisted by: Shane.
Try this page:
hidden link
This is a page which includes the view for Toolset -> User Forms -> (Edit basic account)
If someone isn't logged in, it just says, "No user specified". I would prefer to have a message that says, "Click here to login" with a link to their account login page.
Thanks for any tips!
Hi Canton,
Thank you for getting in touch.
Can you let me know how you are building this edit page. The reason is because you can use out conditional statements to display the form only when the user is logged in .
I need to know how the page is built to provide the correct advise.
Thanks,
Shane
Hi Shane,
I've just got a regular old form that uses the [cred_user_form] shortcode. See attached.
Hi Canton,
In your case you can use our conditional shortcode to resolve this.
[wpv–conditional if="('[wpv-current-user info='logged_in']' eq '1')"] [cred_user_form] [/wpv–conditional] [wpv–conditional if="('[wpv-current-user info='logged_in']' eq '0')"] Please log in [/wpv–conditional]
This should only display your form if the user is logged in.
Please let me know if this helps.
Thanks,
Shane
Hello,
Thanks for the conditional code. However, when I try putting this in my regular old wordpress text area, the WPV-CONDITIONAL code doesn't get interpreted. A reminder, I'm not inserting the [cred_user_form] in the context of a view, I'm just inserting it in the body area of a regular old wordpress page. See attached.
Hi Canton,
It seems you don't have our views or blocks plugin installed.
In order to use the shortcode you must have the views plugin installed. Do you have our Access plugin installed ?
Please let me know.
Thanks,
Shane
HI Shane,
I have all those plugins installed. I've got all kinds of pages that are successfully rendering various views.
Are you sure that [wpv–conditional] is supposed to work outside the context of a view's loop? Because I'm just sticking [cred_user_form] inside a regular old wordpress text block area. I don't believe I can use [wpv-conditional] in that context, can I?
Hey, I just did a test, and you're totally right: I can use [wpv-conditional] in the context of any old HTML body. So I think the error might be in the actual snippet of code you provided me with?
For example, my first two wav-conditionals are rendering great:
[wpv-conditional if="(4 > 3)"]Four is greater than three[/wpv-conditional]
[wpv-conditional if="(3 > 4)"]Three is greater than four[/wpv-conditional]
But the ones you helped me with. (See below, and screenshot.) Maybe something to do with those nested single apostrophes? I'd love your help, because even though I'm a PHP programmer type, I have a real hard time getting my head around the syntax of WPV-CONDITIONALs. Thanks!
[wpv–conditional if="('[wpv-current-user info='logged_in']' eq '1')"]
[cred_user_form form="edit-basic-account"]
[/wpv–conditional]
[wpv–conditional if="('[wpv-current-user info='logged_in']' eq '0')"]
hidden link">Please login to your account.
[/wpv–conditional]
Hi Canton,
Actually the nesting of the shortcodes actually works fine.
Here is another example, I used the autogeneration for the shortcode to create this one.
[wpv-conditional if=" ( ( '[wpv-current-user info="id"]' != '' ) ) " ] [cred_user_form form="edit-basic-account"] [/wpv-conditional] [wpv-conditional if=" ( empty( '[wpv-current-user info="id"]') ) " ] i'm logged out [/wpv-conditional]
Please let me know if these work.
Thanks,
Shane
Thank you! This second snippet of code you sent works fine. The first one must have had a syntax error.
A perfect solution, I very much appreciate it.
My issue is resolved now. Thank you!