Hi I have <button type="submit" class="class1"><span>Create </span></button>
Could anybody say get the same above using railshelper I tried
f.submit "Create",:class => 'class1' But not correct
Thanks Tom
Hi I have <button type="submit" class="class1"><span>Create </span></button>
Could anybody say get the same above using railshelper I tried
f.submit "Create",:class => 'class1' But not correct
Thanks Tom
Hi I have <button type="submit" class="class1"><span>Create </span></button>
Could anybody say get the same above using railshelper I tried
f.submit "Create",:class => 'class1' But not correct
What is not correct about it? What does it generate? If you get an error show us the code around it.
Colin
Colin Law wrote:
Hi � I have <button type="submit" class="class1"><span>Create </span></button>
Not an error f.submit creates the html as <input class="class1" id="model_submit" name="commit" type="submit" value="Create" />
But what I need is exactly <button type="submit" class="class1"><span>Create </span></button>
If directly use this no problem But what I ould like to know an alternative in railshelper
Tom
Tom Mac wrote:
Colin Law wrote:
Hi � I have <button type="submit" class="class1"><span>Create </span></button>
Not an error f.submit creates the html as <input class="class1" id="model_submit" name="commit" type="submit" value="Create" />
But what I need is exactly <button type="submit" class="class1"><span>Create </span></button>
If directly use this no problem But what I ould like to know an alternative in railshelper
Tom
You also have button_tag but this won't create an html <button> tag, it does though create a simple form wrapped around an input which means your backend gets a consistent result regardless of the browser (<button> is a bit inconsistent depending on the users browser).
You also have button_tag but this won't create an html <button> tag, it does though create a simple form wrapped around an input which means your backend gets a consistent result regardless of the browser (<button> is a bit inconsistent depending on the users browser).
oops i meant button_to .....
Tom Mac wrote:
Hi I have <button type="submit" class="class1"><span>Create </span></button>
Could anybody say get the same above using railshelper I tried
f.submit "Create",:class => 'class1' But not correct
Try content_tag -- or just write the literal HTML.
Thanks Tom
Best,
Have you tried: :html=>{:id => 'submit',:class=>'calss1'}
Chris Habgood wrote:
Have you tried: :html=>{:id => 'submit',:class=>'calss1'}
That won't do it. The solutions I provided are the only correct ones.
Best,
works with my submit_to_remote.