Skip Navigation

[Resolved] CRED form displays on top of page instead of in DIV where it should

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.

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by gaborG 5 years, 4 months ago.

Assigned support staff: Nigel.

Author
Posts
#401366

The code I use to display a form in the left side of 2 columns is this:

[wpv-conditional if="( '[wpv-current-user info='role']' eq '' )"]
<div class="row">
  <div class="col col-md-6">
    <h1>New at Medellic?</h1>
    <h3>Register here</h3>
    [cred_form form="Create User - Customer"]
  </div>
  <div class="col col-md-6">
    <h1>Have an account?</h1>
    <h3>Log in here</h3>
    [wpv-login-form]
  </div>
</div>
[/wpv-conditional]

Everything displays correctly, except the CRED form, which instead is on the top of the page, and not inside the DIV where I placed it.
See here: hidden link

Why is this and how can I fix it? Thanks.

#401507

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I wasn't able to reproduce your problem and I can't see the context of where you are adding the code you supplied to see where the problem might arise.

On a clean site using the Toolset starter theme (which uses bootstrap) I created an add user form, then I made a page where I copied your code and added nothing else (I replaced the CRED shortcode for my own form).

When I view the page the content appears in 2 columns as expected.

Could you repeat the same on your site on a new page with no other content on the page? It works okay?

If so, where are you inserting this HTML?

If not, can you switch to a default theme such as the Toolset starter theme and try again?

#401643
CRED user form.jpg

Hi Nigel,
Sorry, my bad. The form displaying on the top is from another CRED module I placed into the layout.
However, the same form should be displayed on the left, next to the login form as well.
Am I referring to the form incorrectly with this?

[cred_form form="Create User - Customer"]

I'm looking to embed the form showed in the image. Why is it not working?

#401655

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

You can refer to the form either by its name or by its ID, as described here:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_form

Again, I'm not sure where you have added the snippet of code you copied.

In isolation, looking at that code, the whole content is wrapped in a conditional tag, so any of its content will only display if the current user has no role.

As for the content itself, it displays one row with 2 half width columns. The column on the left has the cred form "Create User - Customer" and the column on the right has a WordPress login form.

I understood from your first post that the form which should be appearing in the left column actually appears above this row, but the form which I see at the top of that page is actually a different form and should be there, yes? It is just the form on the left that is missing?

In which case, if you think the name of the form might appear incorrectly in the shortcode, be sure to use the Cred Form button to add the shortcode, or check what the id of the form is and use that instead.

If I have misunderstood, please let me know...

#401662
No CRED form button.jpg

OK, so it turns out that referring to the form by its name doesn't work, only referring to it by number.
Anyway, there is no "Cred form button", as you see in the image attached.
By using number I could display the form, so it's all fine now.