Skip Navigation

[Resolved] How to get two dropdowns with a specified width in the same line?

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 10 replies, has 2 voices.

Last updated by ABSTRACTUS 1 year, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2577741

I have an hour field and a minutes field, both dropdowns, and want users to select [hour] : [minute] in a CRED form.

What is happening is that I have a 100% width dropdown field, a ":" and another 100% dropdown field in a column.

When I set the dropdown fields to width:100px or so, they are not that broad but still break, they are not displayed on the same line.

how to achieve that the dropdowns appear in the same line?

btw I'm using KadenceWP, hence no bootstrap. for having two columns (opening time + closing time) i used

<div class="is-layout-flex wp-container-3 wp-block-columns">
<div class="is-layout-flow wp-block-column">
<div class="form-group">
left column content
</div></div>
<div class="is-layout-flow wp-block-column">
<div class="form-group">
right column content
</div></div></div>

#2577799
Bildschirmfoto 2023-03-21 um 14.32.34.png

Just to illustrate, this is a bit of an overkill of space used for hh:mm dropdowns 😉

#2578243

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand you want to display two dropdowns in the same line - is that correct? If no, you can share screenshot of your desired output and send me problem URL where I can see the issue as well as admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2578707
IMG_20230322_072924.jpg

Hi Minesh
Thank you for your reply. What I want to achieve is like this sketch

#2579051

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I got that but I will have to check what CSS is causing this issue. Can you please share problem URL where I can see the dropdowns and admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2579121

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Unfortunately - the admin access details you send to me is not working at this end. Can you please send me working admin access details.

I have set the next reply to private which means only you and I have access to it.

#2579125

sorry I got distracted between sending you the information and saving the new user… now it should work

#2579129

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

I've activated the setting to load the Bootstrap 4 from Toolset from: Toolset => Settings => General => Bootstrap loading section:
=> hidden link

With the form you created I've disable the "Expert Mode" and adjust the fields as you required by drag and drop:
=> hidden link

#2579143

A two column layout I already had before – without loading the bootstrap "just for this" …

So it's still the question, how do I get the dropdowns to a small size that makes real sense?
(to achieve what I sketched)

#2579151

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

I've adjusted the code as given under within your form editor:

<div class="row">
      
      <div class="col-lg-6">
      <label for="%%FORM_ID%%_opening-hour">[cred_i18n name='opening-hour-label']Opening Time[/cred_i18n]</label>
        <div class="row">
        		<div class="form-group col-sm-3">
					[cred_field field='opening-hour' force_type='field' class='form-control' output='bootstrap']
				</div>:
                <div class="form-group col-sm-3">
                    [cred_field field='opening-minute' force_type='field' class='form-control' output='bootstrap']
                </div>
        </div>
      </div>
		
      <div class="col-lg-6">
        <label for="%%FORM_ID%%_closing-hour">[cred_i18n name='closing-hour-label']Closing Time[/cred_i18n]</label>
         <div class="row">
        <div class="form-group col-sm-3">
				[cred_field field='closing-hour' force_type='field' class='form-control' output='bootstrap']
		</div>:
		<div class="form-group col-sm-3">
			[cred_field field='closing-minute' force_type='field' class='form-control' output='bootstrap']
		</div>
        </div>
      </div>
		
	</div>

You can remove unwanted fields from your form if required.

#2579155

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.