4

I am using on Rails 4 ActiveAdmin and Money-Rails. Is there a way to have two or more inputs in a single line of text?

para "Please enter the amount"
f.input :amount_due_currency, :label => "Dollars ",:input_html => {:style => 'width:3%'}
para "and"
f.input :amount_due_cents, :label => "cents ", :input_html => {:style => 'width:10%'}
para "to deposit on your account."

the output that I need would look like Please enter the amount __ Dollars and __ cents to deposit on your account.

I tried string interpolation but that fails. Can someone help me please?

1 Answer 1

3

I believe you can use Arbre columns to layout a form. For greater control I use CSS to override the styling of individual inputs, eg:

form.subscription {
  #details {
    li:nth-child(n+2):nth-child(-n+5) {
      display: inline-block;
      width: 48%;
    }
  }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.