(Note: In certain newer versions of simple_form, the option to use is wrapper: 'bootstrap'.) When using Twitter Bootstrap and SimpleForm together, simple_fields_for needs the option wrapper: 'inline' which can be handed down as follows: Inside the html_options you can add an option :render_options, and the containing hash will be handed down to the form builder for the inserted form. Optionally, you can omit the name and supply a block that is captured to render the link body (if you want to do something more complicated). count : the number of nested items to insert at once.form_name : the name of the form parameter in your nested partial.force_non_association_create: if true, it will not create the new object using the association (see lower).wrap_object : a proc that will allow to wrap your object, especially useful if you are using decorators (e.g.If it contains a :locals option containing a hash, that is handed to the partial. simple_fields_for, semantic_fields_for or fields_for). render_options : options passed through to the form-builder function (e.g.partial: explicitly declare the name of the partial that will be used.this setting still works but data-association-insertion-method takes precedence.data-association-insertion-position : old method specifying where to insert new data.data-association-insertion-method : jquery method that inserts the new data.data-association-insertion-node : the jquery selector of the node as string, or a function that takes the link_to_add_association node as the parameter and returns a node.data-association-insertion-traversal : the jquery traversal method to allow node selection relative to the link.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |