Hi there. I have an unexpected behaviour in a post form.
If the dropdown is in a conditional group, the dropdown doesn't render with 100% width (screenshots with number 1)
If the dropdown is not in a conditional group, it renders with 100% width (screenshots with number 2)
The dropdown load related posts.
Any idea why does it happen this?
I attach 4 screenshots
Hello and thank you for contacting the Toolset support.
To better assist you with this issue, I'll need to analyze the generated HTML in both cases. The best way would be to allow me temporary access to your website and let me check this.
I'll need:
- To know what form is this?
- To know on what page/template this form is being used, so I can analyze it on the frontend?
Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Thank you for the credentials and the details. I can see the issue on the form "Formulari de creacio de vi"
It seems that the width of the dropdown is fixed on the browser side by Javascript code. I was not able to find the root cause yet.
As a workaround, I added the following custom code to the form and it seems to fix the issue.
jQuery(function($){
setInterval(function(){
jQuery('.toolset_select2').each(function(){
var select = jQuery(this);
if ( select.is(':visible')) {
var parent = select.parent();
if ( select.width() !== parent.width() ) {
select.width( parent.width() );
}
}
});
}, 300);
});
This code should work for the second form too, but I did not test it on it.
I'll get back to you as soon as I found something else.
My issue is resolved now. Thank you!