Skip to content

Instantly share code, notes, and snippets.



Last active Nov 13, 2016
What would you like to do?
Camaleon CMS Create Own Custom Fields (Simple Country Select)
<div class="group-input-fields-content">
<%= select_tag "#{field_name}[#{field.slug}][values][]", options_for_select(ISO3166::Country.all_names_with_codes), class: "form-control input-value #{"required" if field.options[:required].to_s.to_bool}" %>
// /themes/e_shop/config/config.json
"hooks": {
"extra_custom_fields": ["eshop_extra_custom_fields"]
gem 'country_select'
module Themes::EShop::MainHelper
def eshop_extra_custom_fields(args)
args[:fields][:my_country_select] = {
key: 'my_country_select',
label: 'Country Selector',
render: theme_view('custom_field/country_select.html.erb'),
options: {
required: true,
multiple: true,

This comment has been minimized.

Copy link
Owner Author

@owen2345 owen2345 commented Aug 16, 2016

screen shot 2016-08-16 at 11 58 24
country selector


This comment has been minimized.

Copy link

@FlowerWrong FlowerWrong commented Nov 13, 2016

It is not work in, but work in standlone rails appliation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment