Search Results

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

Page 68/243 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • Resize form based on if subform visible

    - by dmr
    I have a form with a subform on it. If subform contains no records, it's visible property is false. In that case, I'd like the outer form to shrink so that there isn't a big empty space where the subform was. The long way to do this would be by setting the position for all the controls on the form based on whether the subform is visible. However, is there an easier way to do this (maybe with the can grow/ can shrink property)?

    Read the article

  • What is the recommended way to handle different user roles in a C# application?

    - by Sergio Tapia
    I'm going to make a small application for a business that will be used locally for scanning, and storing documents in a database located on the local machine or on a machine located in the same LAN. I could create a table called Users with username and password and according to the usertype ID show a form, or another form. But I'm more interested in the recommended approach by seasoned programmers. Any advice?

    Read the article

  • Which features do html form elements miss

    - by Bakhtiyor
    I just wondered and wanted to gather together in one place all missing features of our beloved html form elements. One example could be missing of horizontal scrollbar in a listbox. But I am sure there are a lot of features we would like to see in our form elements by default. I order to be clear let's only take into account HTML4, because with HTML5 there are a lot of things haven't been finished yet. One missing feature per answer please. Thank you.

    Read the article

  • PHP SQL Form Insert

    - by Prateek Sachan
    I've developed a form that inserts many things into the database. But somehow, when the page is filled up; it inserts only the user_password that too of the database admin. here is the code. Any help would be great. Invalid Name: We want names with more than 3 letters. Invalid E-mail: Type a valid e-mail please. Passwords are invalid: Passwords doesnt match or are invalid! Please enter your contact number. Please enter your age Congratulations! All fields are OK ;)

    Read the article

  • Loop throught form inputs

    - by Victor
    I have a form with lots of inputs. I want to get each id and value and then put them in $.load method. I tried this: $("#form input").each(function() { var name = $(this).attr("id"); var value = $(this).attr("value"); $.extend(params, { name, value }); }); and then use $.load("script.php", params); But obviously it doesn't work. In params I have only one element "name". And I'm not sure I should use extend method too.

    Read the article

  • Find value of selected item in Drop down menu.

    - by Ozaki
    I have a drop down menu in an ASPX page along the lines of: <form> <select name="cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="fiat" selected="selected">Fiat</option> <option value="audi">Audi</option> </select> </form> That is dynamically generated from another controller (value and label). After the user selects one of the options I need to find out what the selected value/label (will be the same) is so I can hit an update button and retrieve the data on that option. What would be the easiest way to find out the value of the user "selected" option?

    Read the article

  • replace values in form.data when form fails validation

    - by John
    Hi I have a form field which requires a json object as its value when it is rendered. When the form is submitted it returns a comma seperated string of ids as its value (not a json string). however if the form does not validate i want to turn this string of ids back into a json string so it will display properly (is uses jquery to render the json object correctly). how would i do this? I was thinking of overwriting the form.clean method but when I tried to change self.data['fieldname'] I got the error 'This QueryDict instance is immutable' and when i tried to change self.cleaned_data['fieldname'] it didn't make a difference to the value of the field. Thanks

    Read the article

  • How can I log any login operation in case of "Remember Me" option ?

    - by Space Cracker
    I have an asp.net login web form that have ( username textBox - password textBox ) plus Remember Me CheckBox option When user login i do the below code if (provider.ValidateUser(username, password)) { int timeOut = 0x13; DateTime expireDate = DateTime.Now.AddMinutes(19.0); if (rememberMeCheckBox.Checked) { timeOut = 0x80520; expireDate = DateTime.Now.AddYears(1); } FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(username, true, timeOut); string cookieValue = FormsAuthentication.Encrypt(ticket); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, cookieValue); cookie.Expires = expireDate; HttpContext.Current.Response.Cookies.Add(cookie); AddForLogin(username); Response.Redirect("..."); } as in code after user is authenticated i log that he login in db by calling method AddForLogin(username); But if user choose remember me in login and then he try to go to site any time this login method isn't executed as it use cookies ... so i have many questions: 1- Is this the best way to log login operation or is there any other better ? 2- In my case how to log login operation in case of remember me chosen by user ?

    Read the article

  • Nested Select in Rails

    - by James
    I am working on a Rails application which uses categories for items. My category model is self-joined so that categories can be nested: class Category < ActiveRecord::Base has_many :items # Self Join (categories can have subcategories) has_many :subcategories, :class_name => "Category", :foreign_key => "parent_id" belongs_to :parent, :class_name => "Category" ... end I have a form which allows a user to create an item which currently lists all categories in a select, but they are all listed together: <%= f.label :category_id %> <%= select :item, :category_id, Category.all.collect {|c| [ c.title, c.id ]} %> So the select looks something like this: Category1 Category2 Category3BelongsTo2 Category4BelongsTo1 But what I want is: Category1 - Category4BelongsTo1 Category2 - Category3BelongsTo2 Is there a helper for this (which would be awesome!)? If not, how could I accomplish this? Thanks!

    Read the article

  • how to design two inputs in or/And logic for email form with validation

    - by Raj Nimbalkar
    my purpose is user enter only email or mobile number.i have the partial success in that.code notify user in OR logic but....IF user entered the incorrect mobile & email @same time then user must be notified for dat. var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var emailaddressVal = $("#UserEmail").val(); ////email & mobile input cheak if(emailaddressVal == '' && $("#mobile").val() == '') { $("#UserEmail").after('<p><span class="error">Please enter your email address.</span></p>') $("#mobile").after('<p><span class="error">Please enter your Mobile number.</span></p>') hasError = true; } //////validating currect email else if(!emailReg.test(emailaddressVal)) { $("#UserEmail").after('<p><span class="error">Enter a valid email address.</span></p>') hasError = true; } //////Mobile number else if( $("#mobile").val()) { $("#mobile").after('<p><span class="error">Enter currect Mobile number.</span></p>') hasError = true; }

    Read the article

  • Zend Framework Custom Validation Class Error Message

    - by remlabm
    The validation fails as it should but does not return the error message. $form->addElement('text', 'phone_number', array( 'required' => true, 'validators' => array( array('NotEmpty', true, array('messages' => 'Enter a valid Phone Number')), array('regex', false, array('pattern' => '/\([0-9]{3}\)\s[0-9]{3}-[0-9]{4}/', 'messages' => 'Enter a valid Phone Number' )), 'CheckPhoneNumber'), ), )); Custom Class: class Custom_Validators_CheckPhoneNumber extends Zend_Validate_Abstract{ const IN_USE = 'inUse'; protected $_messageTemplates = array( self::IN_USE => "'%value%' is currently in use" ); public function isValid($value) { $this->_setValue($value); $user_check = Users::getActive(preg_replace("/[^0-9]/", "", $value)); if($user_check->id){ $this->_error(self::IN_USE); return false; } return true; } } Just fails does not give the "IN_USE" error.

    Read the article

  • How to generate a user role grid

    - by Svish
    I have the following tables: users (id, username, ... ) roles (id, name) roles_users (user_id, role_id) I am wondering how I can create a nice sort of user-role-grid from that which an admin can use to administer roles to users in a clear way. What I would like is basically a table full of checkboxes sort of like this: Login Editor Admin Alice ¦ ¦ ¦ Bob ¦ ? ? Carol ¦ ¦ ? [Apply] Generating the table isn't too much of a deal, but I am very unsure how to handle it when it comes to how to name all the checkboxes and especially how to read and update the database in a not too clumsy way. Does anyone have any good advice or pointers on how to do this in a mostly clean way? I'm using the Kohana 3 framework, if there is anything there that can make this even easier, but I of course welcome any answer.

    Read the article

  • JS Display Content based on Dropdown User input

    - by Thomas
    I am working on a search box that displays different options based on a users selection via dropdown box. Basically I need a really clean, light-weight method for switching out different divs without reloading the page. Im new to JS, but I know enough that there should be some really simple way of setting the display property using JS - Im just not totally sure how to go about it. Any help would be really appreciated, thanks.

    Read the article

  • Accepting bank account information in a form

    - by jeffthink
    What security concerns are there when accepting a user's bank account information (account number and routing number) via a form on a page that is using SSL, and posting it back to the server where I then curl off a HTTPS request to send that information to an ACH service like First ACH or ACH Direct via their API? We wouldn't be saving the bank account information in our database. I know another option is to use Paypal's Mass Pay API, but they think it's unprofessional (at least for their business) to require customers to have a paypal account to get paid. Thoughts?

    Read the article

  • Accepts Nested Attributes For - edit form displays incorrect number of items ( + !map:ActiveSupport:

    - by Brightbyte8
    Hi, I have a teacher profile model which has many subjects (separate model). I want to add subjects to the profile on the same form for creating/editing a profile. I'm using accepts_nested_attributes for and this works fine for creation. However on the edit page I am getting a very strange error - instead of seeing 3 subjects (I added three at create and a look into the console confirms this), I see 12 subjects(!). #Profile model class Profile < ActiveRecord::Base has_many :subjects accepts_nested_attributes_for :subjects end #Subject Model class Subject < ActiveRecord::Base belongs_to :profile end #Profile Controller (only showing deviations from normal RESTFUL setup) def new @profile = Profile.new 3.times do @profile.subjects.build end end #Here's 1 of three parts of the subject output of = debug @profile errors: !ruby/object:ActiveRecord::Errors base: *id004 errors: !map:ActiveSupport::OrderedHash {} subjects: - &id001 !ruby/object:Subject attributes: exam: Either name: "7" created_at: 2010-04-15 10:38:13 updated_at: 2010-04-15 10:38:13 level: Either id: "31" profile_id: "3" attributes_cache: {} # Note that 3 of these attributes are displayed despite me seeing 12 subjects on screen Other info in case it's relevant. Rails: 2.3.5 Ruby 1.8.7 p149 HAML I've never had so much difficulty with a bug before - I've already lost about 8 hours to it. Would really appreciate any help! Thanks to any courageous takers Jack

    Read the article

  • How do I protect Dynamic data pages using ASP.NET Authentication?

    - by ProfK
    I have a site where most of my pages are arranged in business area folders, e.g. Activations, Outdoors, Branding. Each folder has a small web.config that protects the contents against access by people without a role for that business area. However, basic admin for most business areas is done via Dynamic Data pages. These are only basically protected by not appearing in the menu unless the user has the correct role, but they are still accessible directly via URL, because of the {table}/{Action} routing used by Dynamic Data. What can I do to protect these pages against direct access?

    Read the article

  • Rails - Help scoring an online quiz in RoR

    - by ChrisWesAllen
    I'm trying to grade a quiz application I would like to make. I have a questions model with and ask(the actual question), 4 choices(a-d), and a correct answer(string). In the view I have the 4 question being diplayed then the correct answer choice (This is just a test for functionality) and then I created a text_field to accept the users answer choice and a button to refresh the index action which has the scoring logic, for now.. --Do I need to put the text_field within a form_tag? <p>1. <%= h @question.q1 %></p> <p>2. <%= h @question.q2 %></p> <p>3. <%= h @question.q3 %></p> <p>4. <%= h @question.q4 %></p> <p>Answer: <%= h @question.correct %></p> <%= text_field_tag :choice, params[:choice] %> <%= button_to "Grade", {:controller => 'site', :action => "index"} %> <p> <%= @answer %></p> Heres the index controller action def index @question = Question.find(1) if @question.correct == params[:choice] @answer = 'right' else @answer = 'wrong' end end Its not really working. The textfield is supposed to take a letter choice like 'a' or 'c' and compare it with the correct answer in the database. I would love this to work by radiobuttons, but I'm a newbie to rails so I thought I'd take baby steps. So if anyone can help me with how to fix this by string, or preferably by radiobuttons, I'd really appreciate it.

    Read the article

  • IsAuthenticated is false!

    - by Naor
    This is how I login ('user' holds the data of the user): HttpResponse Response = HttpContext.Current.Response; HttpRequest Request = HttpContext.Current.Request; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, user.UserId.ToString(), DateTime.Now, DateTime.Now.AddHours(12), false, UserResolver.Serialize(user)); HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ticket)); cookie.Path = FormsAuthentication.FormsCookiePath; Response.Cookies.Add(cookie); string redirectUrl = user.HomePage; Response.Redirect(redirectUrl); After this login I get IsAuthenticated == false. Why?? It worked for me before an hour but I don't know what is wrong now.

    Read the article

  • Problem Passing Variable to Submit Form in Firefox

    - by George
    In the following example, I have a link that sends a variable to a function which checks if the variable is true and, if so, submits a form on the page. This has been tested and works in IE, Safari, and Chrome, but not Firefox. Trying to figure out what's wrong in Firefox. The function which checks 'action' and then submits form 'login' : function submit(action) { if (action == "submit") { document.login.submit(); } } Link to pass action variable and submit form: <a href="javascript:submit('submit');">SEND FORM</a> When I remove the check and just have the following, it works fine in Firefox: function submit() { document.login.submit(); } <a href="javascript:submit();">SEND FORM</a>

    Read the article

  • Is a "Confirm Email" input good practice when user changes email address?

    - by dibson
    My organization has a form to allow users to update their email address with us. It's suggested that we have two input boxes for email: the second as an email confirmation. I always copy/paste my email address when faced with the confirmation. I'm assuming most of our users are not so savvy. Regardless, is this considered a good practice? I can't stand it personally, but I also realize it probably isn't meant for me. If someone screws up their email, they can't login, and they must call to sort things out.

    Read the article

  • Using hash to check if page with $_POST values was refreshed

    - by Dieseltime
    When posting a form to the same PHP page, what is the correct method to find if the page was accidentally refreshed instead of submitted again? Here's what I'm using right now: $tmp = implode('',$_POST); $myHash = md5($tmp); if(isset($_SESSION["myHash"]) && $_SESSION["myHash"] == $myHash) { header("Location: index.php"); // page refreshed, send user somewhere else die(); } else { $_SESSION["myHash"] = $myHash; } // continue processing... Is there anything wrong with this solution?

    Read the article

  • jquery hide certain form elements untill a certain textfield has been populated?

    - by Rubytastic
    I have a long signup form and would like to hide a few fields and only show them when a certain input field is populated with text, if the user types some text in this field the other form fields will show. I have looked at hide and show divs but have some trouble getting form elements hide and show them on a certain trigger ( populating a form with text ) anyone can point me in the right direction on how to implement such feature in query ? thx in advanche!

    Read the article

  • Using now() in a <asp:textbox>

    - by Anthony
    Can anyone help. I am using a formview in VS 2005. I have different elements in my form databound to a database and I am performing an INSERT SQL statement. No problem. The problem is that I am trying to enter the current date into the SQL statement and I am having a problem. I can add <%now()% to the "Text" property of the asp:Textbox. But when I do, then I can't bind the textbox to a specific database column. How do I do both???? I can do this: <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Initiate_Date") %>' ></asp:TextBox> Or this: <asp:TextBox ID="TextBox2" runat="server" Text='<%# now() %>' ></asp:TextBox> But I don't know how to do both.

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >