2

I have to choose between different strings with my rails form (simple_form_for), but I can't get the value submited. I have seen answers on stack, but none of them works.

here is the form in my view:

  <%= simple_form_for(@prospect, url: new_client_special_order_path) do |f| %>

    <%= f.radio_button :context, 'launch product' %>
    <%= f.label :context, 'launch product', value: 'launch product' %>
    <%= f.radio_button :context, "going abroad" %>
    <%= f.label :context, "going abroad", value: "going abroad" %>
    ...
  <% end %>

here are the parameters :

 {"utf8"=>"✓", "authenticity_token"=>"7yRCcJOitjlTN1PhueUfjRTCWR4FflFGIS0McCr/Zt5tHBmR+siSVEX+Sn7o6x6gtzbDlPfqH9ZOziQUG8meqw==", "prospect"=>{"context"=>""}, "commit"=>"Créer mon brief", "controller"=>"home", "action"=>"create_client_prospect_special"}

Can you help please, thank you.

4
  • "but I can't get the value in the params." is not helpful to help you. Tell use more. Show us the server log what you see when you submit the form. Commented Nov 2, 2015 at 14:54
  • @ArupRakshit, I updated the question. it's the only thing interesting you would get in the logs. The string is not sent during the submit action. Commented Nov 2, 2015 at 15:11
  • I don't see anything to POST in the params except some standard values.. Commented Nov 2, 2015 at 15:15
  • Have you tried verifying that :context is permitted? Commented Jun 24, 2018 at 17:45

0

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.