Select field with option to enter custom value

QuestionsSelect field with option to enter custom value
Manuel Torres asked 5 years ago

Hello, one of my columns is formatted as this:

$col[“edittype”] = “select”;
$col[“formatter”] = “select”;
$col[“editoptions”][“value”] = “10:$10;20:$20;30:$30;40:$40;”;

This only allows me to select 10, 20, 30 or 40. ¿How can I give the user choice of either choose one from the list or write a custom value?

Something like this:

https://stackoverflow.com/questions/5650457/html-select-form-with-option-to-enter-custom-value

Thanks,

Manuel Torres

2 Answers
Abu answered 5 years ago

Working demo here: https://gist.github.com/d28ef92ebf210cf0c0b6d582b1b59364

Line 66,70

Manuel Torres answered 5 years ago

Great! This is exactly what I needed.

Your Answer

9 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?