Search Results

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

Page 77/243 | < Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >

  • codeigniter populate form from database

    - by Delirium tremens
    In the controller, I have... function update($id = null) { $this->load->database(); // more code $data = array(); $data = $this->db->get_where( 'users', array( 'id' => $id ) ); $data = $data->result_array(); $data = $data[0]; // more code $this->load->view('update', $data); } In the view, I have... <h5>Username</h5> <input type="text" name="username" value="<?php echo set_value('username'); ?>" size="50" /> <h5>Email</h5> <input type="text" name="email" value="<?php echo set_value('email'); ?>" size="50" /> <h5>Email Confirmation</h5> <input type="text" name="emailconf" value="<?php echo set_value('emailconf'); ?>" size="50" /> <h5>Password</h5> <input type="text" name="password" value="<?php echo set_value('password'); ?>" size="50" /> <h5>Password Confirmation</h5> <input type="text" name="passconf" value="<?php echo set_value('passconf'); ?>" size="50" /> set_value() isn't reading $data search for value="" at http://codeigniter.com/forums/viewthread/103837/ The poster uses only the set_value() function between "" in value="". I'm wondering how to do the same, but I can't get it to work. Help?

    Read the article

  • single sign on in asp.net

    - by gopal
    Hi , We have developed implemented single sign on methodology to authenticate user. When a page is requested, if it is not authenticated then a login page will be redirected. Once they logged in the requested page will be shown. this is working when we don't assign a domain to the virtual directory. But when we assign the domain to virtual directory after the authentication the application is not redirecting to the requested page. We are using FormsAuthentication.GetRedirectUrl method to redirect the requested page. Why this is happening? How can we resolve this issue?

    Read the article

  • Javascript: Perform function on form submit

    - by flight643
    Hopefully this is a pretty simple question! I've got the code working in jQuery to listen for a specific form on a page to be submitted and perform an alert when it is.. I.e.: The form itself doesn't have a name so I am targetting the form within a specific form ID. $("#content form").submit(function() { alert("lorem ipsum dolor?"); }); What would be the syntax for performing this in javascript alone without using jquery? For example, I have this code (below) and just am unsure of how to listen for the form to be submitted to perform an action.. var submitform = document.getElementById("content").getElementsByTagName("form"); Thanks!

    Read the article

  • Setting a form field's value during validation

    - by LaundroMat
    I read about this issue already, but I'm having trouble understanding why I can't change the value of a form's field during validation. I have a form where a user can enter a decimal value. This value has to be higher than the initial value of the item the user is changing. During clean(), the value that was entered is checked against the item's previous value. I would like to be able to re-set the form field's value to the item's initial value when a user enters a lower value. Is this possible from within the clean() method, or am I forced to do this in the view? Somehow, it doesn't feel right to do this in the view... (To make matters more complicated, the form's fields are built up dynamically, meaning I have to override the form's clean() method instead of using the clean_() method).

    Read the article

  • Contact form with php-script does not work

    - by elajjas
    I'm new to the forum and I have been trying to find a thread that could be helpful but nothing have been working out so far. I recently uploaded my site via FTP, and it works fine. Except for one thing, my contact form. The contact form is crucial and it is almost the whole point of the website. I don't get any emails "from the form", either in my spam-folder or inbox. Please have a look at the website which is: http://www.adspot.se The contact form is situated on: http://www.adspot.se/contact.html The php script looks like this: <?php if (isset($_REQUEST['email'])) //if "email" is filled out, send email { //send email $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail("[email protected]", $name, $message, "From:" . $email); } ?> I've already tried different types of php-scripts, but it still doesn't seem to work. UPDATE: Changed the form code to: <form method="POST" action="email.php"> <div class="row half"> <div class="6u"> <input name="name" placeholder="Name" type="text" class="text" /> </div> <div class="6u"> <input name="email" placeholder="Email" type="text" class="text" /> </div> </div> <div class="row half"> <div class="12u"> <textarea name="message" placeholder="Message"></textarea> </div> </div> <div class="row half"> <div class="12u"> <ul class="action"> <input type="submit" class="action"> </ul> </div> </div> </form> Now it redirects me to www.adspot.se/email.php but still no emails received...

    Read the article

  • Using javascript, show a certain amount of divs based on an answer

    - by Adam
    I'm building a form that first asks if you have 'foo'. If the answer is 'Yes', a div appears and asks 'How many foo do you have'? Based on the quantity answered, I'd like to show only that many divs. Thus if the user answers 1, only the first div will show. If they answer three, the first three will show. I have it set so that if the user answers no, the question of the amount remains hidden, but if they answer yes, they would be prompted for the quantity. This is what I've got so far... <script type="text/javascript"> $(document).ready(function(){ $(window).load(function() { $('#amt_of_foo,.foo_panels').hide(); }); $('#yes_foo').click(function() { $('#amt_of_foo').show(); }); $('#no_foo').click(function() { $('.foo_panels,#amt_of_foo').hide(); }); }); </script> </head> <body> <ul> <li> <div class="panel section_panel"> <h2>Questions About Your Foo</h2> <span>Do you have foo?:</span> <input type="radio" name="foo" id="no_foo" /> No <br /> <input type="radio" name="foo" id="yes_foo" /> Yes:</span></span> <span id="amt_of_foo"> <span>How many foo do you have?:</span> <span><input id="qty_of_foo" type="text" size="5" /> </span> </span> </div> </li> <!--answered yes to foo, and entered amount--> <div class="foo_panels"> <li> <li> <div class="panel foo_1"> <h1>First foo's information</h1> <span>Foo name:&nbsp;<input type="text" size="20" /></span> </div> </li> <li> <div class="panel foo_2"> <h1>Second foo's information</h1> <span>Foo name:&nbsp;<input type="text" size="20" /></span> </div> </li> <li> <div class="panel foo_3"> <h1>Third foo's information</h1> <span>Foo name:&nbsp;<input type="text" size="20" /></span> </div> </li> </div> <!--answered no to foo--> <li> <div class="panel"> <h1>Next Question, if no foo</h1> </div> </li> </ul> The ul is used for a jQuery 'slider' plugin. the 'panel' class is used for global css.

    Read the article

  • Formset Messages

    - by Dave
    I want to be able to send a message using the new messages framework. Something along the lines of : ... if formset.is_valid return HttpResponseRedirect( some page ) messages.add_message(request,messages.INFO, '%i objects added') %formset.number_of_forms But two questions: Im not sure if i should put the messages before or after the render to response Is there a method akin to number_of_forms

    Read the article

  • Send <p> tags and simple HTML formatting through a form via PHP.

    - by Jonathan
    Hi, so I need the user to write a review about an article or book and send it to a DB via PHP but with some basic HTML formatting.. I mean, I have a form , when the user writes the review, the data is sent but without any kind of formatting, If the user want to write in a new line, the text is sent like plain text, I need to get also those new line breaks and simple stuff. I know how to use PHP and DB connection, I just need to know how to get those new line breakes and stuff..

    Read the article

  • How to set the ReturnUrl for the Login link in MVC 3 app?

    - by user762196
    using System; using Microsoft.Practices.Unity; namespace <MyNameSpace> { public class UrlFactory { public static UrlFactory Current { get { return HttpApplicationUnityContext.Current.Resolve<UrlFactory>(); } } public string GetLoginUrl() { return String.Format("{0}/login?ReturnUrl={1}", MyConfig.BaseHttpUrl, <GET_PAGE_URL>); } } The user can be on any page on the site and click the Login link. But the ReturnUrl must always point to the exact page where he clicked it. I must take the user back to the page he clicked the login link. In my code above, how do I get the page url in <GET_PAGE_URL>? Thanks

    Read the article

  • How do I create a polymorphic model with a collection_select?

    - by muxe
    This are my models: class Speaker < ActiveRecord::Base belongs_to :session, :foreign_key => :session_id, :class_name => :Session belongs_to :speakable, :polymorphic => true end class Session < ActiveRecord::Base has_many :speakers accepts_nested_attributes_for :speakers end class Person < ActiveRecord::Base has_many :speakers, :as => :speakable end class Company < ActiveRecord::Base has_many :speakers, :as => :speakable end What I want to do now is something like this: app/views/sessions/edit.html.erb <% f.fields_for :speakers do |sf| %> <p> <%= sf.label :speaker %><br /> <%= sf.collection_select :speakable, Company.all + Person.all, :id, :full_name %> </p> <% end %> But it is not working because of the polymorphic assignment. How do I approach this problem? EDIT: The Error is: undefined method `base_class' for String:Class with params being: "speaker"=>{"speakable"=>"1063885469", "session_id"=>"1007692731"} The value passed to speakable is the id of the Speaker/Company. Yes, this is the value I specified the collection_select to return, but how can I manage to supply both values (speakable_id and speakable_type) ?

    Read the article

  • MS Access raise form events programmatically

    - by Eric G
    Is it possible to raise built-in MS Access form events programmatically? I have a feeling it isn't but thought I would check. (I am using Access 2003). For instance, I want to do something like this within a private sub on the form: RaiseEvent Delete(Cancel) and have it trigger the Access.Form delete event -- i.e. without actually deleting a bound record. Note my delete event is not handled by the form itself but by an external class, so I can't simply call Form_Delete(Cancel).

    Read the article

  • HTML table manipulation using jQuery

    - by Daniel
    I'm building a site using CakePHP and am currently working on adding data to two separate tables at the same time.. not a problem. The problem I have is that I'm looking to dynamically alter the form that accepts the input values, allowing the click of a button/link to add an additional row of form fields. At the moment I have a table that looks something like this: <table> <thead> <tr> <th>Campus</th> <th>Code</th> </tr> </thead> <tbody> <tr> <td> <select id="FulltimeCourseCampusCode0CampusId" name="data[FulltimeCourseCampusCode][0][campus_id]"> <option value=""></option> <option value="1">Evesham</option> <option value="2">Malvern</option> </select> </td> <td> <input type="text" id="FulltimeCourseCampusCode0CourseCode" name="data[FulltimeCourseCampusCode][0][course_code]"> </td> </tr> </tbody> What I need is for the row within the tbody tag to be replicated, with the minor change of having all the zeros (i.e. such as here FulltimeCourseCampusCode0CampusId and here data[FulltimeCourseCampusCode][0][campus_id]) incremented. I'm very new to jQuery, having done a few minor bits, but nothing this advanced (mostly just copy/paste stuff). Can anyone help? Thank you.

    Read the article

  • MYSQL/PHP: Inserting data via HTML form, same "input name"

    - by Camen
    I'm new to MySQL and as a learning project I'd like to make a recipe database. I'd like to the user to be able to enter ingredients through a simple HTML form but I'm stuck in how to label the form so that I can enter several ingredients into the database at once. I'd like to do something like this: <form method="post" action="insert.php"> Ingredient 1: <input type="text" name="ingredient"><br /> Ingredient 2: <input type="text" name="ingredient"><br /> Ingredient 3: <input type="text" name="ingredient"><br /> <input type="submit" value="Submit"> </form> When I do this, I add rows to the table but they're all empty. I know it's got something to do with me using "ingredient" (the table value where I want to add the ingredient name) several times in the form, but I just don't know how to solve it. I would absolutely love some input on how to make it work.

    Read the article

  • Getting Undefined index errors when trying to use $_POST

    - by Apoorv Agrawal
    I'm getting the following error messages: Notice: Undefined index: name in C:\xampp\htdocs\ApoorvProject\PostMethod.php on line 7 Notice: Undefined index: email in C:\xampp\htdocs\ApoorvProject\PostMethod.php on line 9 This is what line 7 and line 9 contains: echo $_POST["name"]; echo "<br>"; echo $_POST["email"]; This is the body of my HTML documnent: <form action="PostMethod.php" method="post"> Name: <input type="text" name="name" /> Email: <input type="text" name="email" /> <input type="submit" /> </form> PostMethod.php is the name of my PHP file.

    Read the article

  • Is it possible to authenticate on another website?

    - by Blankman
    If I am on a website#1, and I enter my username/pwd for website#2 on a login page that is on website#1, and website#1, behind the scenes, makes a httpwebrequest to website#2 and posts to the login page. If I then navigate to website#2, should I be logged in? website#2 uses formsauthentication and I call a httpHandler that is on website#2 and pass it the username/password via the querystring. Should this work?

    Read the article

  • Rails nested form for belongs_to

    - by user1232533
    I'm new to rails and have some troubles with creating a nested form. My models: class User < ActiveRecord::Base belongs_to :company accepts_nested_attributes_for :company, :reject_if => :all_blank end class Company < ActiveRecord::Base has_many :users end Now i would like to create a new company from the user sign_up page (i use Devise btw) by given only a company name. And have a relation between the new User and new Company. In the console i can create a company for a existing User like this: @company = User.first.build_company(:name => "name of company") @company.save That works, but i can't make this happen for a new user, in my new user sign_up form i tried this (i know its wrong by creating a new User fist but im trying to get something working here..): <%= simple_form_for(resource, :as => resource_name, :html => { :class => 'form-horizontal' }, :url => registration_path(resource_name)) do |f| %> <%= f.error_notification %> <div class="inputs"> <% @user = User.new company = @user.build_company() %> <% f.fields_for company do |builder| %> <%= builder.input :name, :required => true, :autofocus => true %> <% end %> <%= f.input :email, :required => true, :autofocus => true %> <%= f.input :password, :required => true %> <%= f.input :password_confirmation, :required => true %> </div> <div class="form-actions"> <%= f.button :submit, :class => 'btn-primary', :value => 'Sign up' %> </div> I did my best to google for a solution/ example.. found some nested form examples but it's just not clear to me how to do this. Really hope somebody can help me with this. Any help on this would be appreciated. Thanks in advance! Greets, Daniel

    Read the article

  • How to detect if a form input element of type file is empty

    - by Ankur
    I have some code which reads a file through a form field of type file <input type="file" ... /> I want to give the user another option of providing a url to a file rather than having to upload it as many are already online. How can I detect when this field is empty on the server side. I am using Apache Commons FileUpload FileItemStream item = iter.next(); name = item.getFieldName(); stream = item.openStream(); if(!item.isFormField()){ if(item.toString()!=""){ .... I need to detect when item is empty. The above code doesn't work, nor does using: if(item.equals(null)){ ....

    Read the article

  • form Validation white page not showing errors

    - by Jess McKenzie
    In the example below I am wanting to do all of the 'safety' checks on the $_POST variables but it seems when I click submit I get a white page why? I am wanting it to show the errors etc Form Process: /* check if the form is submitted */ if (isset($_POST['submitButton'])) { $fullName = $_POST['fullname']; if($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($fullName)) { if (!ctype_alpha(str_replace(array("'", "-"), "",$fullName))) { $errorfullName .= '<span class="errorfullName">*First name should be alpha characters only.</span>'; } if (strlen($fullName) < 3 OR strlen($fullName) > 40) { $errorfullName .= '<span class="errorfullName">*First name should be within 3-40 characters long.</span>'; } } }

    Read the article

  • Does Spring MVC form submit data bind children objects automagically?

    - by predhme
    I have a data model that is something like this: public class Report { // report owner private User user; ... typical getter setter ... } public class User { ... omitted for clarity } What happens is when a report is created, the current user is set to the report user object. When the report is edited, the spring controller handling the POST request is receiving a report where the user object is null. Here is what my controller looks like: @Controller @RequestMapping("/report") public class ReportController { @RequestMapping(value = "/edit/{id}", method = RequestMethod.GET) public String editReport(@PathVariable Long id, Model model) { Report r = backend.getReport(id); // fully loads object model.addAttribute("report", report); return "report/edit"; } @RequestMapping(value = "/edit/{id}", method = RequestMethod.POST) public String process(@ModelAttribute("report") Report r) { backend.save(r); return "redirect:/report/show" + r.getId(); } } I ran things throw the debugger and it looks like in the editReport method the model object is storing the fully loaded report object (I can see the user inside the report). On the form jsp I can do the following: ${report.user.username} and the correct result is rendered. However, when I look at the debugger in the process method, the passed in Report r has a null user. I don't need to do any special data binding to ensure that information is retained do I?

    Read the article

  • How to get rid of "d»z" or "" characters

    - by Cassandra
    I have website based on Umbraco 5. I have installed contact form plugin (http://cultivjupitercontact.codeplex.com/). And on the web page at the end of this contact form there are always characters "d»z". It looks like that: ... <input type="submit" value="Send" /> </fieldset> <input name='uformpostroutevals' type='hidden' value='somevalue' /></form>d»z I suspect there is something wrong with encoding. I have tried to change it(to ANSI or UTF-8 without BOM but it didn't helped. Perhaps I have changed it in wrong file, cause I don't really know where exactly this 'd»z'is coming from. All I know it came with this plugin. On different server those extra characters are "". How can I get rid of those extra characters? Any help much appreciated!

    Read the article

  • PHP contact form sends empty data

    - by Alan Lawlessness
    I am trying to create a HTML5 contact form compatible with computer and mobile devices, when I clicked on send message it jumps into a blank white screen. I do get a email but it contains no information. I am quite new with PHP. For www.rare1.ca/test: <!DOCTYPE html> <html> <head> <title>Responsive HTML5/CSS3 template</title> <meta charset="utf-8" /> <meta name = "viewport" content = "width=device-width, maximum-scale = 1, minimum- scale=1" /> <link rel="stylesheet" type="text/css" href="css/default.css" media="all" /> <link rel="stylesheet" href="css/flexslider.css" type="text/css" /> <link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css' /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="js/jquery.flexslider.js"></script> <script src="js/default.js"></script> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="js/respond.min.js"></script> <![endif]--> </head> <body> <div id="pagewidth"> <header id="header"> <div class="center"> <nav id="mainNav"> <ul> <li class="active"><a href="#pagewidth"><span>gallery</span></a></li> <li></li> <li></li> <li></li> <li></li> <li><a href="#contactUs"><span>contact us</span></a></li> </ul> </nav> </div> </header> <div id="content"> <section class="row"> <div class="center"> <h1><img src="img/logo.gif" width="142" height="78"></h1> <strong class="subHeading">Coming soon</strong> <div class="gallery"> <ul class="slides"> <li><img src="img/img-gallery.jpg" alt="image" /></li> <li><img src="img/img-gallery2.jpg" alt="image" /></li> <li><img src="img/img-gallery3.jpg" alt="image" /></li> </ul> </div> <div class="buttons"></div> </div> </section> <section id="contactUs" class="row grey"> <div class="center"> <h1>Contact Us</h1> <strong class="subHeading">lorem ipsum dolor sit amet, consectetur adipiscing elit</strong> <div class="columns"> <div class="half"> <form action="sendemail.php" class="form"> <fieldset> <h2>Feedback form</h2> <div class="formRow"> <div class="textField"><input type="text" name="Name" id="name" placeholder="Your name ..." /></div> </div> <div class="formRow"> <div class="textField"><input type="text" name="Email" id="email" placeholder="Your Email ..." /></div> </div> <div class="formRow"> <div class="textField"><textarea name="Message" cols="20" rows="4" placeholder="Your message ..."></textarea> </div> </div> <div class="formRow"> <button class="btnSmall btn submit right"> <span>Send Message</span> </button> </div> </fieldset> </form> </div> <div class="half"> <h2>How to find us</h2> <div id="map"> <div class="imgHolder"><img src="img/map.jpg" alt="google map" /></div> </div> </div> </div> </div> </section> </div> <footer id="footer"> <div class="center"> </div> </footer> </div> </body> </html> <?php // This is the script for sending email. // change the email address below to your own email address. $mailTo = '[email protected]'; $name = htmlspecialchars($_POST['Name']); $mailFrom = htmlspecialchars($_POST['Email']); $message_text = htmlspecialchars($_POST['Message']); $headers = "From: $name <$mailFrom>\n"; $headers .= "Reply-To: $name <$mailFrom>\n"; $message = $message_text; mail($mailTo, $subject, $message, $headers ); ?>

    Read the article

  • Make form redirect users after posting

    - by Liso22
    I need to change a form so that instead of reloading the page after submitting it, it redirects the user to another page, this is the form: <form class="questionform" name="questionform-0" id="questionform-0"> <textarea class="question-box" cols="12" rows="5" id="question-box-' . $questionformid . '" name="title" type="text" maxlength="200" size="28"></textarea> <input type="text" class="ubicacion" value="" name="question"> <input type="button" name="ask" value="Publicar" onclick="askquestion('questionform-0'); window.location.reload(true);"> I want to remove the window.location.reload and change it for a redirect that sends users to the page their comment will appear. Which is: www.chusmix.com/s?= (the content of the second field) The problem is that the content of the second field is part of the url I want to redirect, it's not simply always the same URL. So I have no idea how to do it. How do I do it? Anyway thanks for any info or whatever that points me on the right direction. Thanks

    Read the article

  • Using jQuery with form to eliminate spam

    - by Thierry-Dimitri Roy
    I have put a form on a web page where the user can send us data. Unfortunately, the webmaster does get a lot of spam through this form and the valid submissions gets buried. I have used captcha to bypass this problem. But I think that everyone would agree that captcha is a big annoyance to users. I switched to another solution: now the URL of the submit form points to null: <form id="sendDataForm" action="/null" method="post"> ... </form> And I bypass the form submission using jQuery excellent form plugin: $('#sendDataForm').ajaxForm({ url: '/ajax-data/' }); Since then, no spam has reached the webmaster, and valid comments gets through. The only drawbacks is that users without javascript cannot send us the form. But since this is on top of a javascript web application, we can safely assume that these are not valid users. My question is: in a world where 99% of users has javascript enabled (and a mechanism for those user could be build that uses captcha), why is this solution not more used? What drawback am I not seeing?

    Read the article

  • Symfony: Pass an object from another module to a form

    - by djcloud23
    I have a symfony project and I have one model, which for this example I will name Boat. From the Boat's showSuccess page, I would like to make a link to another model's form page. For this example we will call it Ticket. When they click on the link, I would like for the Boat object to be passed to the Ticket form because I have to display some of that specific Boat's fields (title, price, etc) on the Ticket form page (newSuccess.php). I guess my question is, how do I pass an object (as a variable) to another model's "new" form page. I have looked everywhere and I can't seem to find an answer that works for me. Thank you!

    Read the article

< Previous Page | 73 74 75 76 77 78 79 80 81 82 83 84  | Next Page >