forms

clear default value

I found a lot of examples but I'm trying to figure out the simplest way to clear an input's default value when clicking it. This is for a search box. I have "Search for post" and I want to clear that when clicking on it. I tried using jquery but for some reason it doesn't work. $('#search').click(function() { if($(this).va...

PHP - How to submit a select menu without a button

Hello, Is it possible to auto submit a select menu when the selection changes without using a button to submit the form. I have four of these on my page and using a button for each uses up too much space. By Select Menu, I mean: <select name="something" class="something" title="something something"> <option selected="selected">Option ...

PHP form enter will not give me the text fields.. [http-auth login for security]

<?php $prev_path = "./../../."; $dont_redirect = true; require_once "${prev_path}./config.php"; session_start(); function http_digest_parse($txt){ $needed_parts = array("nonce"=>1, "nc"=>1, "cnonce"=>1, "qop"=>1, "username"=>1, "uri"=>1, "response"=>1); $data = array(); $keys = implode("|", array_keys($n...

rails fields_for with ajax

Hi guys, I am building a dynamic form builder.. And i have a problem which i can't seem to fix. So i have a db table called "forms" forms can have "fields".. The problem is that when a user creates a new 'field' (click add-field) then it should ajax the new field for .. that field. The problem is that i can't just do something l...

How do you pass options through a fields_for ?

I am trying to run this.. - f.fields_for :referrals do |qf| But I would like to pass this, @organization.referrals.select{|ref|ref.new_record?} as well. This is so that the forms passed are exclusively new objects, and not older ones. I've tried to do this.. - f.fields_for :referrals do |qf| - if qf.object.new_record? = render...

How to remember input form values?

Hi, I am trying to create 2 forms, which the user can select by clicking form1 and formt2. When the user select between form1 and form2. I want form2 to remember the value of form1 and pass on the value of the selected form for submission How can this be done in the most simplest way? Thanks ...

Logging into Microsoft Online website programatically with C#

Hi guys, I'm trying to write a utility which will attempt to login to the Microsoft Online Admin website and report back as to whether it is reachable. Using code mainly from this article, http://odetocode.com/articles/162.aspx and some screen scraping I have pieced together the following. Unfortunately it doesn't work, the final respon...

How can I loop through a series of response variables with a specific prefix in PHP?

I'm posting a form to a php script. The form contains a dynamic number of fields named cardObjectX, where X is a counter. Example: cardObject1, cardObject2, and so on. I need to loop through all the cardObject fields in my php script, but because we don't know how many there will be for any given post, we can't hard-code the field names....

PHP Timer security

I have a timer on the site which the user will only be able to click on every * seconds/minutes/hours. Every user has a timer value in the users table where the values are written and read. The value in the database is the amount of seconds that the user will have to wait. I've figured out how to make the timer countdown from the correc...

Convert and Print Structure contents to a form in Visual Basic

Hello, I am trying to print the contents of a structure onto a print page in Visual Basic(visual studio 2008). However my for each loop generates a conversion error? Could someone help me figure out whats wrong? Thanks Public Class Form1 Structure IncomeRecord Dim IDVal As Integer Dim HouseholdNum As Integer Dim YearlyInco...

How do I use the page URL as a form variable?

I'm trying to use the page URL as a variable inside a form submission so that I can write it into my database and figure out what pages are getting more list sign-ups. Is there any easy way to do this? ...

simple_form: how to create a grouped select box?

I'm using simple_form gem for creating Rails forms. http://github.com/plataformatec/simple_form All is great, except how do I create a grouped select box? Can't find it in the docs or by google-ing. ...

Keep selectbox value after submit

On a website that I'm currently making I placed a selectbox were user's can sort a list of items displayed on the page. When they choose one, the page is being submitted and the selectbox value jumps back to the first default one. Now I want the selectbox to retain value after submitted. Im working in XSLT, so I can't use PHP. Is there...

Relation between number of elements in form and users completing form?

Hi everyone, We're in the middle of an ongoing discussion about the sole number of form elements in a form and how it affects the user to actually avoid from submitting the form. The sales department wants the user to enter as many details as possible, so they can call up the customer based upon his or her entered information. My opini...

how to show windows user control from another windows user control in c#.net

Hi, can anyone tell me how to achieve the below scenario: I have a windows form in which a windows user control(first user control) is present. On click of the button in the first windows user control I want to show another windows user control(second) and hide the first one. Please let me know the procedure to do this. Thanks in Adva...

how to post form details including the url of a file uploaded to a csv file with php

Hi, Please could someone help with the following: Using PHP I want to be able to post the details entered into a form to a csv file. This is quite straight forward on its own, however one of the fields in the form needs to upload a file, so the csv file needs to contain a link to where the file is saved. Thanks ...

WPF Forcing MouseDevice to be pressed

Hi! I have a windows form in a wpf window, and I'm trying to use DragMove when I click on the windows form, it's a picturebox so I want to be able to drag the window around just by clicking the picture. I catch my form's mouse down, and raise the wpf window's mouseleftbuttondown event with: if (e.Button == MouseButtons.Left) {...

How to validate a Django Form field against a FK field

I am attempting to create a validation rule that passes an error if the (milestone)objects target_date is greater then the projects target_date. The issue is that none of the errors are being raised. For simplicities sake, models.py class Project(models.Model): target_date = models.DateField() class Milestone(models.Model): p...

Drupal web forms that can be half-filled and remember my input when I come back

Drupal's webform module is awesome for building forms, but since my form is very long, I'd like my users to be able to: Fill in some data, Save them (without submitting the form) Do something else and finally Come back after some time to fill in the rest of the data and submit. Is there a way to do this? I suppose this is a common ...

prefilling an iframe form from another domain

Hey, I'm trying to prefill a form that's located in another domain. I have the form in an iframe and I remember that javascript doesn't allow cross domain scripting, so how would I go about filling in a form that's located on another domain? Is it even possible? I want to help my users by pre-filling certain information of the form tha...