Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1113933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:55:50+00:00 2026-05-17T02:55:50+00:00

The view: <%= form_for :blog_post do |f| %> <ul> <li> <%= f.label :title %>

  • 0

The view:

<%= form_for :blog_post do |f| %>
  <ul>
    <li>
      <%=  f.label :title %>
      <%= f.text_field :title, :type => 'text', :id => 'title', :size => '', :limit => '255' %>
    </li>

  </ul>
<% end %>

<!DOCTYPE html> 
    <html> 
    <head> 
      <title>LevihackwithCom</title> 
      <script src="/javascripts/prototype.js?1285902540" type="text/javascript"></script> 
      <script src="/javascripts/effects.js?1285902540" type="text/javascript"></script> 
      <script src="/javascripts/dragdrop.js?1285902540" type="text/javascript"></script> 
      <script src="/javascripts/controls.js?1285902540" type="text/javascript"></script> 
      <script src="/javascripts/rails.js?1285902540" type="text/javascript"></script> 
      <script src="/javascripts/application.js?1285902540" type="text/javascript"></script> 
      <meta name="csrf-param" content="authenticity_token"/> 
      <meta name="csrf-token" content="UnhGSHHanJHfgJYhnksqJ1bfq3W+QEU2GJqLAMs2DmI="/> 
    </head>

    <body> 

    <form accept-charset="UTF-8" action="/blog_post/new" method="post">
      <div style="margin:0;padding:0;display:inline">
        <input name="utf8" type="hidden" value="&#x2713;" />
        <input name="authenticity_token" type="hidden" value="UnhGSHHanJHfgJYhnksqJ1bfq3W+QEU2GJqLAMs2DmI=" />
      </div> 
      <ul> 
        <li> 
          <label for="blog_post_title">Title</label> 
          <input id="title" limit="255" name="blog_post[title]" size="" type="text" /> 
        </li> 
      </ul> 
    </form> 

    </body> 
    </html> 

I’m messing around with form helpers. The above code shows my view file as well as the HTML it generates. What is with the terrible div full of inline CSS stuffed with hidden fields I didn’t explicitly ask for? What settings cause these fields to be generated? Is there a way for me to remove the inline CSS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T02:55:51+00:00Added an answer on May 17, 2026 at 2:55 am

    These fields are generated in rails forms for robustness:

    utf8=✓

    The utf8 hidden field ensures that the form values are submitted as UTF8. It does this by ensuring that at least one UTF8 character in the form gets submitted. Most browsers respect the document’s encoding and treat the form values the same, but there’s one browser that has a problem. Hence, utf8 gets a checkmark.

    The authenticity_token is there to prevent cross-site request forgery.

    Similar hidden fields get generated for checkboxes. Since unchecked checkboxes don’t get submitted to the server, a hidden field ensures that a “0” (false) value gets submitted: this is helpful when you have an array of checkboxes.

    These fields get wrapped in a div with inline styles to ensure that they don’t break the layout. You could poke around in the form helper source code and override this, but I wouldn’t recommend it: it’s minimally intrusive, and it’s there for a reason.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my view: = form_for(@user) do |f| = f.autocomplete_field @user.city.name, autocomplete_city_name_users_path On the
My view for the new form is <h1>Add Form 3C </h1> <%= form_for([@basiccase, @form3c])
In Microsoft Access 2007 under (Form View), how do you make text in a
I am using Wizard-step for my form in a view, My project is on
I am using a form to submit filter parameters for a view. There are
When click a button,I want to popup a view form bottom,like this! Any help
I have this code in my view: echo form_label('State', 'state'); $options = array( 'No
I making an application to view videos form youtube, and I think it is
I am doing a JBoss SEAM project and when I view a form I
I'm running Delphi 2009. When I try to view a form in the form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.