Forums

Dynamic dropdown only works on 1 form / page

jorgve 04 Apr, 2016
Hi,

I´ve succesfully created a form with a dynamic dropdown, making a dropdown field "Provincia" depending on the dropdown field "Pais".

To do so I specified the provinces I wanted to set in the "Events" tab of "Pais":
On = España Set Options Provincia.. list of different values.
On = Mexico Set Options Provincia.. list of different values
etc.

And this works perfectly, only not when placing the same, or another form with the same Events on one page.

Here you can see a live example on my website:
http://profesionalonline.com/pc-carrier/sobre-nosotros/

At the left you will find two yellow colored forms, the first one works as it is supposed to do, but the second one (which is exactly the same form) doesn't work.

The debugger, Send Email and Redirect also don't seem to work.. While they work out of the box on my Joomla! website..

Could you please help me out?
jorgve 04 Apr, 2016
The forms are located on the right side.. Not the left, but I guess you will find them anyway.
GreyHead 04 Apr, 2016
Answer
1 Likes
Hi jorgve,

I don't know a lot about CF on WordPress :-(

I think that the problem with the Dropdowns is that when you duplicate a form on the same page the element IDs are no longer unique. You'd need to make sure that they are different to get that to work.

I don't know about the other actions without testing.

Bob
jorgve 04 Apr, 2016
Thanks for your fast reply Greyhead, I really appreciate it!

And you're right, I changed the element ID of the "provincia" of one of the forms and it works correctly now!🙂
I didn't look into this as in Joomla I had various pages with multiple forms and the dynamic dropdowns worked fine.

About the "Send email", I will look into the SMTP settings of Wordpress, as I´m quite new to it as well.

But I hope you can help me with the redirection, when I enter the URL in the "Redirect" element in the "Setup" page, it isn't working..

I remember that in Joomla it also didn't work directly, and I put this PHP in a "custom code" element to make it work:

<?php
$absolute_url = 'gracias-fin-del-formulario';
$uri =& JFactory::getURI();
$form->data['redirect_url'] = $uri->base().$absolute_url;
?>

But the same code won't work for Wordpress, I don't even know if the issue is the same..

I'd appreciate any help I can get!

I will take this oportunity to thank you guys for making Chronoforms available for Wordpress, we're changing CMS and I'm glad I can continue working with the best and most complete form builder available🙂
Max_admin 02 Mar, 2017
Hi jorgev,

Does it redirect at all ? because WordPress has a problem with redirection from plugins in general.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 02 Mar, 2017
Hi jorgve,

This will let you redirect in WordPress (at least it seems to work for me) but I have found no way to then show a message
wp_redirect('index.php');


Bob
This topic is locked and no more replies can be posted.