You are viewing limited content. For full access, please sign in.

Question

Question

Make Dropdown Multiselect

asked on September 10, 2024

Hello

Please I need help on this one.

I discovered now that the New Form Designer does not have multi select capability unless  I use the check box and this wont satisfy my requirements

Please does anyone know if there is a a way i can make the dropdown a multi-select field?

Also, is there a way i can add the options in bulk?

 

Thank you

0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on September 24, 2024 Show version history

You can try this formula in the date field. Note Week_Number is the variable name from the week number field, change this to whatever you need.

 

= IF(
  Week_Number <> "",
  IF(
    DATE(YEAR(NOW()), 1, 1) = 1,
    DATE(YEAR(NOW()), 1, 1) + (Week_Number - 1) * 7 - WEEKDAY(DATE(YEAR(NOW()), 1, 1)) + 1,
    DATE(YEAR(NOW()), 1, 1) + (Week_Number) * 7 - WEEKDAY(DATE(YEAR(NOW()), 1, 1)) + 1
  ),
  ""
)

 

0 0

Replies

replied on September 10, 2024

I'm assuming checkbox won't work for you because you want to fill it with a lookup. In LF12 coming out in a few months you will be able to setup a checkbox field with a lookup and automatically convert that to a dropdown when its length exceeds a user defined limit (could be 0 if you want it to always be a dropdown)

2 0
replied on September 11, 2024

Thanks Zachary,

I am actually not using look up I am adding the options manually but want the User to be able to search through the list. I have done this when i created a template field in the metadata section but the form designer does not have that capability. Checkbox will work but i cannot search a check box and again, where the USer has a long list of options to select, it might be a bit awkward going through the ist of names one by one without being able to narrow the list.

0 0
replied on September 11, 2024

The dropdowns (checkbox and radio converted to dropdowns as well) will all have the "search to narrow" ability in LF12!

1 0
replied on September 11, 2024

Thanks. But for the moment is there a way to achieve this or even add a scroller to the Check box?

0 0
replied on September 11, 2024

You cant add the search functionality yourself, but if you want to make it take up less vertical space and scroll inside the field instead you can use the following CSS. Add this class to your field "max-height-checkbox" and note each checkbox row is 29px so you can calculate how many you want to show.

.max-height-checkbox .cf-field {
   max-height: 145px;
   overflow: auto;
}

 

0 0
replied on September 11, 2024

Thanks Zachary,

This is the kind of solution that will satisfy. But please how do i add this to the checkbox field?.

Am using the new form designer?

0 0
replied on September 11, 2024

Add the class to the checkbox field "max-height-checkbox". It is under the advanced tab in the field settings. Then go to the CSS pane on the top right and paste that CSS there.

0 0
replied on September 11, 2024

Thanks Zach,

I added to css classes field. but it has not changed.

0 0
replied on September 11, 2024

you should add the class "max-height-checkbox" in your screenshot where it says CSS Classes.

Then you would paste the rest of the code into the CSS pane which should be under styles (the paint brush top right) and CSS tab of the right pane.

0 0
replied on September 11, 2024

.max-height-checkbox This is the class right?

 

for CSS Field

.cf-field {

max-height: 145px;
overflow: auto;

Like so?

 

0 0
replied on September 11, 2024

CSS Classes (Field setting): "max-height-checkbox"

Styles -> CSS: 
 

.max-height-checkbox .cf-field {
   max-height: 145px;
   overflow: auto;
}

 

0 0
replied on September 11, 2024

Hello Zachary,

Sorry for all the bother.

This is what i specified in the cssfield;

Then in the class field

 

Hasnt worked yet Am using New Designer

 

0 0
replied on September 11, 2024

in the textbox in your top screen how the only text that should be there is:

 

.max-height-checkbox .cf-field {
   max-height: 145px;
   overflow: auto;
}

 

0 0
replied on September 12, 2024

Thanks Zachary it worked perfectly. But please i have more request. How do i reduce the text size of the options in the check box?

0 0
replied on September 12, 2024

In general I would try to avoid reducing font sizes, as it is already as small as possible to support visually impaired audiences, but if its something the business needs you can just modify the same CSS here with whatever size you want:

.max-height-checkbox .cf-field {
   max-height: 145px;
   overflow: auto;
   font-size: 12px;
}

 

1 0
replied on September 12, 2024

Thanks again Zachary.

Please is there a way to make selected options display in a list rather than within the check box? Because then i Cant see the remaining selectiosn cos they are hidden within the scroll? 

See image . Only the selections at the top are visble not those within the scroll

0 0
replied on September 12, 2024

Does your checkbox field have this option highlighted in green?

0 0
replied on September 12, 2024

No it doesnt.

Am using the New Form Designer

0 0
replied on September 12, 2024

Then not until you update Forms. It looks like the latest version of forms version 11 has the checkbox to dropdown conversion. Otherwise the scrolling is your only option.

0 0
replied on September 12, 2024

Thanks Zachary I have the updated version of forms on the live server and has that available.

So what do i do when i get to live server/? And will it display the selected options in a list?

0 0
replied on September 12, 2024

You should probably have all environments match the same versions so you dont need to worry about anything. In the live server you would have to manually go into the process and change this setting to "Use a dropdown" and set the choices value to 0 or more depending on your use case.

0 0
replied on September 23, 2024

Working perfectly. Thanks so much.

Please i have another similar request, how can i make the date field change to display first day of the week(MOnday in this instance) when i select the week number in another field?

 

So i have a Week field in which i enter the current week. And i have date field which is currently sent to current date. But i want a scenario where once I enter the week (Say week 39) the date field will display the first monday of that week?

0 0
APPROVED ANSWER SELECTED ANSWER
replied on September 24, 2024 Show version history

You can try this formula in the date field. Note Week_Number is the variable name from the week number field, change this to whatever you need.

 

= IF(
  Week_Number <> "",
  IF(
    DATE(YEAR(NOW()), 1, 1) = 1,
    DATE(YEAR(NOW()), 1, 1) + (Week_Number - 1) * 7 - WEEKDAY(DATE(YEAR(NOW()), 1, 1)) + 1,
    DATE(YEAR(NOW()), 1, 1) + (Week_Number) * 7 - WEEKDAY(DATE(YEAR(NOW()), 1, 1)) + 1
  ),
  ""
)

 

0 0
replied on September 25, 2024

Wow! Worked perfectly. Thanks so much Zachary.  Please one  more request. How can i set the Date of end of week based on the Year Week? The way it is running now with the formula you gave me, when i pick the Week of the year, the date field changes to the start of that week. How do i also automticall y display the end date of the week which should be sunday. Week Starts and Weekd ends,,,,

0 0
replied on September 26, 2024 Show version history

The form calendar picker is set for weeks starting on sunday and ending on saturday. The final date of the week is set at the very end of the formula. You can see the one below sets it to sunday instead by adding 7
 

= IF(
  Week_Number <> "",
  IF(
    DATE(YEAR(NOW()), 1, 1) = 1,
    DATE(YEAR(NOW()), 1, 1) + (Week_Number - 1) * 7 - WEEKDAY(DATE(YEAR(NOW()), 1, 1)) + 7,
    DATE(YEAR(NOW()), 1, 1) + (Week_Number) * 7 - WEEKDAY(DATE(YEAR(NOW()), 1, 1)) + 7
  ),
  ""
)

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.