"Other" field - Add value to your list

"Other" field - Add value to your list

You are here:

[vc_row][vc_column][vc_column_text]

Issue

Client wants to add to the user-entered "Other" value into the dropdown, checkbox or radio button group.

Use Case

Client is a service organization and its clients are multilingual.  He currently has a checkbox list of languages for his clients to identify as their spoken languages.  The final choice is "Other".  If a user chooses Other and enters a value, client would like to automatically add that value to the list of options.

Solution

Use the formidable filters frm_after_create_entry and frm_after_update_entry to get the Other value entered in and add it to the Options column of the field element's entry (wp_frm_fields).

Credits to

Tree Martschink (@Tree Martschink on the Formidable Slack channel) for having this situation.

Caveats

You open yourself to people adding unwanted values to your list, either with typos, unacceptable language or possible hacking.

Code

[/vc_column_text][vc_raw_html]JTNDYmxvY2txdW90ZSUzRSUwQSUzQ3ByZSUzRSUwQWFkZF9hY3Rpb24lMjglMjdmcm1fYWZ0ZXJfY3JlYXRlX2VudHJ5JTI3JTJDJTIwJTI3YWZ0ZXJfc2F2ZWRfY2hlY2tfb3RoZXIlMjclMkMlMjAzMCUyQyUyMDIlMjklM0IlMEFhZGRfYWN0aW9uJTI4JTI3ZnJtX2FmdGVyX3VwZGF0ZV9lbnRyeSUyNyUyQyUyMCUyN2FmdGVyX3NhdmVkX2NoZWNrX290aGVyJTI3JTJDJTIwMTAlMkMlMjAyJTI5JTNCJTBBZnVuY3Rpb24lMjBhZnRlcl9zYXZlZF9jaGVja19vdGhlciUyOCUyNGVudHJ5X2lkJTJDJTIwJTI0Zm9ybV9pZCUyOSUyMCU3QiUwQSUwOWlmJTIwJTI4JTI0Zm9ybV9pZCUyMCUzRCUzRCUyMDQlMjklMjAlN0IlMjAlMkYlMkYlMjBjaGFuZ2UlMjA0JTIwdG8lMjB5b3VyJTIwZm9ybSUyN3MlMjBpZCUwQSUwOSUyMCUyMCUyMCUyMCUyNGZpZWxkSWQlMjAlM0QlMjAxMCUzQiUyMCUyRiUyRiUyMGNoYW5nZSUyMDEwJTIwdG8lMjB5b3VyJTIwY2hlY2tib3glMjdzJTIwZmllbGQlMjBpZCUw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klN0QlMEElN0QlMEElM0MlMkZwcmUlM0UlMEElM0MlMkZibG9ja3F1b3RlJTNF[/vc_raw_html][vc_column_text]*FrmField::delete_form_transient( $form_id) is key, otherwise you won't see your change until hours or days later.[/vc_column_text][/vc_column][/vc_row]

Table of Contents
info@fog.org
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram