Tell us what you are trying to do?
I have a post Productores
and Other
Solicitudes
and a relation Productores x Solicitudes.
I need that on the page of a Solicitudes put a VIEW with a list of producers with a form that relates the current Solicitud with the Productor of the view once I click on the complete form button.
Here is an example but in the view the Productor completes itself but the Solicitud, I need it to be chosen from the current view.
and to be able to make those fields invisible and that only a "Contact" button appears
What is the link to your site?
hidden link
Hi,
Thank you for contacting us and I'd be happy to assist.
When I checked the page the current "Productores" from the view's loop item and the current "Solicitudes" from the page, were automatically selected in the relevant relationship fields.
( screenshot: hidden link )
To hide the select fields from the form, so that only the submit button is visible, you can include the following custom CSS code in the view's CSS editor:
.js-wpv-view-layout-1925 .cred_rel_form_class .form-group {
display:none;
}
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Hi thanks.
Now we're types are related.
But when I want to record one, the page is refreshed and the following parameter is added: "cred_referrer_form_id=1907" and the thank you message appears in all of them.
Can the "Submit" button be hidden once the relationship already exists?
So that the client can see to which "Productores" he sent a quote and to which he did not.
This "Solicitud" is completely unrelated and you can try clicking on a form.
hidden link
Tks.
Thanks for writing back.
To suggest the best way to achieve this, I'll need to see how this view and the form are set up in the admin area.
Can you please share temporary admin login details, along with the link to the page with this view?
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
Thank you for sharing these details.
I noticed that the template "Cliente Cotización" includes a view "Productores Listado en Solicitud", that shows all the "Productores".
And inside this view's loop, another view "Boton solicitar contizacion" is nested which shows only the related "Solicitudes".
The relationship form "Cotizaciones" is added in this second view, in a way that it only shows when there are no related "Solicitudes" posts, which is correct. The only option that needed to be disabled was "Don't include current page in query result".
( screenshot: hidden link )
After disabling it, the relationship form is only showing for unrelated posts, now.
( screenshot: hidden link )
Tks, Waqar
But it doesn't display the data correctly.
For example the "Solicitud"
santiago-santini (ID 1939)
He has two relationships (Productor X Solicitud) but he doesn't really have any.
And the "Solicitud"
ford-focus (ID 1936)
has two relationships (Productor X Solicitud) but shows neither.
the process is the following:
The client creates a "Solicitud" Then see all the "Productores" and choose the ones you want to quote.
In the template "Cliente Cotización" includes a view "Productores Listado en Solicitud", that shows all the "Productores".
And inside this view's loop, another view "Boton solicitar contizacion" is nested which shows only the related "Solicitudes X Productores".
And (Solicitudes X Productores) need the id of the "Productor" on the loop and the ID of the "Solicitud" on the current page.
Tks.
Hello
I was able to solve the problem.
Now I have to see how to make the page not reload when the form is completed.
you can try to complete the form with this url.
hidden link
If I can complete this, I could make the project successful.
Tks
Thanks for the update and glad that you were able to solve this.
I'm afraid, there is no option available in the relationship forms, to completely stop the page from reloading.
In the form's "After visitors submit this form" field, you'll see these 3 options:
- Go to a specific page/post
- Reload the current page
- Redirect back to the page from which the user came from
In a way, reloading the page is important too. Whenever a new relationship is created using the form's submission, only after the reload, the necessary changes in the relationship form's field and page's data can be seen. Without the reload, it wouldn't be clear which relationships are already created.
My issue is resolved now. Thank you!