Search Results

Search found 6055 results on 243 pages for 'forms'.

Page 74/243 | < Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >

  • Form is creating already loaded attributes in addition to new attributes, how do I ignore the first?

    - by looloobs
    In my application you: Have an admin user that signs on and that user has a role (separate model), then I use the declarative_authorization plugin to give access to certain areas. That admin user can also register new users in the system, when they do this (using Authlogic) they fill out a nested form that includes that new users' role. So what is happening is the role of the admin user is being loaded by the declarative_authorization and then the nested form using the has_many_nested_attributes is loading that existing role as well as the new role for the new user (users can have many roles). Is there some way I can tell the new User being created to ignore the role assigned to the current_user and only create the role in the form for the new user? I have looked through a lot of different things, but it seems to get more complicated that these are nested attributes. Thanks in advance.

    Read the article

  • Check if a variable is empty

    - by Thomas
    I have some user-submitted variables that I want to display in a different part of my site like this: <div class="pre_box">Term: </div> <div class="entry"><?php $key='term'; echo get_post_meta($post->ID, $key, true); ?></div> Occasionally, these variables might be empty in which case I don't want to display the label for the empty variable. In the example above I would want to hide the <div class="pre_box">Term: </div> part. Is there some simple way to check if a php variable like the one above is empty and prevent the label from being displayed?

    Read the article

  • CakePHP Form Helper Database Interaction

    - by xtine
    Currently I am developing a CakePHP that will list various businesses. In the database, there is a table for businesses that lists them like so: id | name | address | city | state | state_id | zip | url The state column are abbreviations of states (for listing purposes) CA, AK, FL, etc and the state_id matches up with the ids in the states table: id | name | state_abbr I have an admin_add.ctp template with form helpers for inserting new businesses. For entering a state for a business I am going to have a pull down that lists all the states. However, how do I make the database insert so it will know how to add the state abbreviation and state id when I submit the form to add the business?

    Read the article

  • How do I create an empty Django formset using modelformset_factory?

    - by nbolton
    I'm creating a formset, but it seems to populate it with all of the existing data in the table for that object. I can't figure out how to start with a blank formset; the only way seems to be to delete all of the data from the table, but clearly this isn't an option. I will post code if necessary (but there's lots of it, so knowing what is relevant is tricky).

    Read the article

  • Best Practice: Accessing radio button group

    - by seth
    Looking for the best, standards compliant, cross browser compatible, forwards compatible way to access a group of radio buttons in the DOM (this is closely related to my other most recent post...), without the use of any external libraries. <input type="radio" value="1" name="myRadios" />One<br /> <input type="radio" value="2" name="myRadios" />Two<br /> I've read conflicting information on getElementsByName(), which seems like the proper way to do this, but I'm unclear if this is a standards compliant, forwards compatible solution. Perhaps there is a better way?

    Read the article

  • Joomla url issue with sh404SEF

    - by user5858
    it's couple of months I've been using SH404SEF With my site. But in my site I'm getting url's in the form: http://www.downloadformsindia.com/Income-Tax-Forms/all-income-tax-return-itr-forms-2010-2011.html?task=view If I remove this suffix(?task=view), it takes us to the same page. I had raised this issue in SH404SEF forum, and I was told that this data is taken as parameter by search engines hence ignored. I want to redirect using RewriteMatch in .htaccess all such url's to the url's without ?task=view ones : ....downloadformsindia.com/Income-Tax-Forms/all-income-tax-return-itr-forms-2010-2011.html?task=view to be redirected to http://www.downloadformsindia.com/Income-Tax-Forms/all-income-tax-return-itr-forms-2010-2011.html So my question is: Will this redirection create 404's in the Google webmaster. I've thousand's of pages in the site

    Read the article

  • Is there a way to do this with basic JS DOM?

    - by Thomas
    I need to apply/remove to an input field according to a user's selection in a separate drop down form - but I can't figure out how to target the input's class. I need to add/remove the 'pageRequired' class from this input: <input type="text" title="Company Required" name="customfields-tf-2-tf" class="inputclass pageRequired textInput" id="customfields-tf-2-tf" /> When the user selects one of two options from a drop down field. For example: <select class="dropdown" name="customfields-s-1-s" id="customfields-s-1-s" > <option value="Owner"<?php if(in_array("Owner",$temp_values)) { ?> selected='selected'<?php } ?>> Owner</option> <option value="Broker"<?php if(in_array("Broker",$temp_values)) { ?> selected='selected'<?php } ?>> Broker</option> </select> If the user selects broker than I want to add the pageRequired class to the first input field and remove it if the user selects Owner.

    Read the article

  • Step by Step validation with jquery validation plugin

    - by Alex
    I know its been asked many times already but no one could come up with solution so far. The idea is to have one form separated into few steps and validate each step on next click of the button. I know jquery validation plugin is offering quite complicated way of doing it with accordion but can anyone come up with a simple solution something like var stepOne = { rules: { fieldname1: "required", fieldname2: "required", } } $("form").validate(stepOne); //onclick hope someone could suggest the best way of doing it. Thanks.

    Read the article

  • How to make Multi-Pane GUI in WPF or C#?

    - by xarzu
    I have seen this user interface in some screen shots of some RSS Readers. It is a multi-pane user interface. THere are three panels or "panes" to the window, in other words, the window is divided into three parts and the user is able to mouse over the division and click on the seperation bar and resize the section. How is this sort of GUI developed in C#?

    Read the article

  • Examples of fast .NET WPF/WinForms apps?

    - by mythz
    I am currently investigating whether to build a windows application using unmanaged C/C++ or in .NET and would like to know of the kind of performance and responsiveness that is capable with a managed C#/.NET GUI app? Not surprisingly it looks like the fastest most responsive applications (e.g. chrome, spotify, etc) are written in unmanaged C/C++. I've had a hard time finding examples of really good .NET applications and so I would like some help. What's the best example of a fast and responsive .NET windows application?

    Read the article

  • Joomla contact form doesn't pass W3C validation

    - by aramaz
    Hi, I get the following error when I try to validate a contact page on my site: document type does not allow element "script" here The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). I am using Joomla 1.5.7, and the doctype is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Any idea how to fix this?

    Read the article

  • Ruby on Rails unknown attribute form error

    - by Ulkmun
    I'm attempting to create a form which will allow me to upload a file.. I've got the following form.. <div class="field"> <%= f.label :title %><br /> <%= f.text_field :title %> </div> <div class="field"> <%= f.label :body %><br /> <%= f.text_area :body, "cols" => 100, "rows" => 40 %> </div> <div class="field"> <%= f.label :upload %><br /> <%= f.file_field :upload %> </div> <div class="actions"> <%= f.submit %> </div> I've got a controller which seems to error in this function.. # POST /posts # POST /posts.xml def create @post = Post.new(params[:post]) @post = DataFile.save(params[:upload]) ##render :text => "File has been uploaded successfully" respond_to do |format| if @post.save format.html { redirect_to(@post, :notice => 'Post was successfully created.') } format.xml { render :xml => @post, :status => :created, :location => @post } else format.html { render :action => "new" } format.xml { render :xml => @post.errors, :status => :unprocessable_entity } end end end That's the method that get's called when I create the post. The error is unknown attribute: upload app/controllers/posts_controller.rb:42:in ``new' app/controllers/posts_controller.rb:42:in ``create'

    Read the article

  • extending spring form tag library attributes

    - by TimmyJ
    I'm using Spring's form tag library in a Spring MVC application that I am developing. The company I am working for has implemented some company-wide policies based on the definition of custom attributes for certain tags. For instance, by default (though the inclusion of a standard javascript file) all tags have their values automatically converted to upper case. In order to disable this one would define their tag with a custom attribute in the following way: <input type="text" uppercase="false" /> The problem is that the addition of these custom attributes to a spring:form tag causes an error at runtime. I've pasted the error below. org.apache.jasper.JasperException: /WEB-INF/jsp/reportCriteria.jsp(45,5) Attribute uppercase invalid for tag input according to TLD My question is: is there any way to extend the TLD to allow for these attributes, or is there any other way add these custom attributes to these spring:form tags?

    Read the article

  • codeigniter and form action trailing / issue??

    - by alex
    Hi, I am having a bit of an issue with the way CI is dealing with /. In a regular form i notice that the following form action didn't work action="mydomain.com/ci-controller/login/" but this one does work action="mydomain.com/ci-controller/login" Strange but he it worked. But now i need this from a iframe, i the iframe i have a login form which sets the parents url to mydomain.com/ci-controller/login, but i get the same error as it was calling mydomain.com/ci-controller/login/ Could my problem be that the call from the iframe adds a trailing / which is not visible?? Any thoughts

    Read the article

  • Updating nested attributes causes duplicate entries

    - by params_noob
    I have a has_many and belongs_to relationship between Job and Address. When I try to update Job and Address in the same form, it updates job but creates a duplicate entry for Address. Am I missing something here? The Edit and Update Actions from Jobs: def edit @job = Job.find(params[:id]) end def update @job = Job.find(params[:id]) if @job.update_attributes(job_params) flash[:success] = "Job Updated" redirect_to current_user else render 'edit' end end The edit form: <h1>Edit Job Information</h1> <div class="row"> <div class="span6 offset3"> <%= form_for(@job) do |f| %> <%= render 'shared/error_messages' %> <%= f.label :recipient %> <%= f.text_field :recipient %> <%= f.label :age %> <%= f.text_field :age %> <%= f.label :gender %> <%= f.text_field :gender %> <%= f.label :ethnicity %> <%= f.text_field :ethnicity %> <%= f.label :height %> <%= f.text_field :height %> <%= f.label :weight %> <%= f.text_field :weight %> <%= f.label :hair %> <%= f.text_field :hair %> <%= f.label :eyes %> <%= f.text_field :eyes %> <%= f.label :other_info %> <%= f.text_field :other_info %> <h3> Address Information </h3> <%= f.fields_for :addresses do |address| %> <%= address.label :label, "Label" %> <%= address.text_field :label %> <%= address.label :addy, "Address" %> <%= address.text_field :addy %> <%= address.label :apt, "Apt/Suite/etc" %> <%= address.text_field :apt %> <%= address.label :city, "City" %> <%= address.text_field :city %> <%= address.label :state, "State" %> <%= address.text_field :state %> <%= address.label :zip, "Zip code" %> <%= address.text_field :zip %> <% end %> <%= f.label :instructions, "Service Instructions" %> <%= f.text_field :instructions %> <%= check_box_tag(:rush) %> <%= label_tag(:rush, "Rush?") %> <%= f.submit "Update Job", class: "btn btn-large btn-primary" %> <% end %> </div> </div>

    Read the article

  • How to stop Django from adding extra html elements to rendered widgets.

    - by stinkypyper
    I have a Django radio button group that renders to HTML as follows: <ul> <li><label for="id_package_id_0"><input type="radio" id="id_package_id_0" value="1" name="package_id" /> Test 256</label></li> <li><label for="id_package_id_1"><input type="radio" id="id_package_id_1" value="2" name="package_id" /> Test 384</label></li> <li><label for="id_package_id_2"><input type="radio" id="id_package_id_2" value="3" name="package_id" /> Test 512</label></li> <li><label for="id_package_id_3"><input type="radio" id="id_package_id_3" value="4" name="package_id" /> Test 768</label></li> <li><label for="id_package_id_4"><input type="radio" id="id_package_id_4" value="5" name="package_id" /> Test 1024</label></li> </ul> I need it to render without being a list. I am a aware of form.as_p, form.as_table, and form.as_ul. They will not help me as they continue to add extra HTML tags. As well, I am not using the form object in it's absolute entirety, just for validation. I am doing a custom template for the form already, but wish to continue to the radio widget.

    Read the article

  • Using control from a separate class in C#

    - by DazSlayer
    I have a program that dynamically creates controls when it starts, it works just fine when the code to do this is in the class of the actual form. I tried moving the code to a separate class and found that I could not use Controls.Add(). How can I add controls to the Form from a separate class? This is what I have so far: TextBox txtbx = new TextBox(); txtbx.Text = "asd" + x.ToString(); txtbx.Name = "txtbx" + x.ToString(); txtbx.Location = new Point(10, (20 * x)); txtbx.Height = 20; txtbx.Width = 50; Controls.Add(txtbx); Error 1 The name 'Controls' does not exist in the current context

    Read the article

  • jQuery append breaks my HTML form (with submit button)

    - by JimFing
    I'm trying to create a form with a submit button via jQuery using append(). So the following: out.append('<form name="input" action="/createuser" method="get">'); out.append('Username: <input type="text" name="user" />'); out.append('<input type="submit" value="Submit" />'); out.append('</form>'); However, clicking on submit, nothing happens! However if I do the following: var s = '<form name="input" action="/createuser" method="get">' + 'Username: <input type="text" name="user" />' + '<input type="submit" value="Submit" />' + '</form>'; out.html(s); Then the submit button works fine! I'm happy to use the 2nd method, but would rather know what the problem is here. Thanks

    Read the article

  • Image input onclick event being fired when enter button Pressed

    - by Anthony
    I have a strange problem where an onclick event on an input image is being fired when i hit enter in input text box <form id="MyForm" action="/someaction"> <input type="image" src="someimage.jpg" onclick="doStuff();$('#MyForm').submit();" /> <input type="text" name="textInput"/> </form> When the cursor is in the text box and i hit enter, rather than the form being submitted it calls the onclick event on the image input. Any ideas whats going on ?

    Read the article

  • Inline form fields with labels placed on top

    - by rcourtna
    I can't believe I'm having to ask this, but I'm at my wit's end. I'm trying to display 2 form fields inline, but with the label for each field on the top. In ascii art: Label 1 Label 2 --------- --------- | | | | --------- --------- Should be pretty simple. <label for=foo>Label 1</label> <input type=text name=foo id=foo /> <label for=bar>Label 2</label> <input type=text name=bar id=bar /> This will get me: --------- --------- Label 1 | | Label 2 | | --------- --------- To get the labels on top of the boxes, I add display=block: <label for=foo style="display:block">Label 1</label> <input type=text name=foo id=foo /> <label for=bar style="display:block">Label 2</label> <input type=text name=bar id=bar /> After I do this, the labels are where I want them, but the form fields are no longer inline: Label 1 --------- | | --------- Label 2 --------- | | --------- I've been unable to find a way to wrap my html so the fields display inline. Can anyone help?

    Read the article

  • Setting Rails Checkbox from Another Model

    - by Kevin
    I have a checkbox that belongs to "Foo" class. I have another "Preferences" class that sets the default for what that checkbox should be. I tried using f.check_box :email_preference, :value => preferences.email_preference but it doesn't work. I use this page to do new record creation as well as edit, so obviously for new records I would want to take the preferences.email_preference setting as a default, then for editing the record use the foo.email_preference. Any suggestions?

    Read the article

  • Is there any way to get all the controls on a container control?

    - by Mason Wheeler
    I've got a form with a bunch of controls on it, and I wanted to iterate through all the controls on a certain panel and enable/disable them. I tried this: var component: TComponent; begin for component in myPanel do (component as TControl).Enabled := Value; end; But that did nothing. Turns out all components are in the form's component collection, not their parent object's. So does anyone know if there's any way to get all the controls inside a control? (Besides an ugly workaround like this, which is what I ended up having to do): var component: TComponent; begin for component in myPanel do if (component is TControl) and (TControl(component).parent = myPanel) then TControl(component).Enabled := Value; end; Someone please tell me there's a better way...

    Read the article

  • Submit pdf form fields to a HTTP POST request

    - by Josjojo
    I've made a pdf form in Adobe Acrobat. Now I want to make a button that submits the form to a HTTP POST request. I have searched for about 4 hours, but I have not found an example to do this. Here I read that it is possible to send the pdf form fields with a HTTP submission, but there's also no example given: http://acrobatusers.com/tutorials/form-submit-e-mail-demystified I'm looking for a JavaScript example that I can link to the submit button.

    Read the article

  • Mac Safari randomly recreating cookie when I refresh my login screen. Very bizarre

    - by mcintyre321
    We have found an issue in our app where Safari on the Mac randomly recreates a login cookie from a logged off session. I have a fiddler archive with this behaviour here. Note that some stuff has been removed from this to make it easier to get, but nothing which sets a cookie or anything has been taken out - only repetitions of requests 3-8. I'll talk you through the running order Request 1: user logs out via call to /logout.aspx - Set-Cookie returned setting cookie expiry date to 1999 Requests 2-8: user refreshes login page sending calls to root or /res/en-US/s.js - no cookie is sent to server or received back, and access is denied. I have cut out a lot of requests of this nature from the log as they are boring Request 9: request for /res/en-US/s.js - Hv3 authentication cookie has mysteriously reappeared! Wat. There was NO set-cookie! WTFF! Request 10+ : now the cookie has reappeared, the site logs the user in AGAIN The cookie, when examined in Safari looks like <dict> <key>Created</key> <real>259603523.26834899</real> <key>Domain</key> <string>.mysite.dev</string> <key>Expires</key> <date>2010-03-24T16:05:22Z</date> <key>HttpOnly</key> <string>TRUE</string> <key>Name</key> <string>.Hv3</string> <key>Path</key> <string>/</string> </dict> One thing to note is that in Safari, the cookie domain is .mysite.dev not mysite.dev (which is the cookie domain specified in web.config) - however, given that access is denied in requests 2-8, it looks like the cookie has expired OK. If you look in the list of cookies in the browser during 2-8, the .Hv3 cookie is not there. Is this our bug or Safari's? What can I do to stop it happening?

    Read the article

< Previous Page | 70 71 72 73 74 75 76 77 78 79 80 81  | Next Page >