diff --git a/lib/custom_wizard/builder.rb b/lib/custom_wizard/builder.rb index da10a100..fab99446 100644 --- a/lib/custom_wizard/builder.rb +++ b/lib/custom_wizard/builder.rb @@ -86,7 +86,7 @@ class CustomWizard::Builder required: field_template['required'] } - %w(label description image key validations min_length max_length char_counter placeholder).each do |key| + %w(label description image key validations min_length max_length char_counter).each do |key| params[key.to_sym] = field_template[key] if field_template[key] end @@ -187,6 +187,16 @@ class CustomWizard::Builder ) end + if field_template['placeholder'].present? + params[:placeholder] = mapper.interpolate( + field_template['placeholder'], + user: true, + value: true, + wizard: true, + template: true + ) + end + field = step.add_field(params) end