Search Results

Search found 7625 results on 305 pages for 'duane fields'.

Page 7/305 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Adding date to multiple fields via datepicker

    - by Andy
    i have a form in drupal with jquery based date module. there are multiple fields with date picker enabled. i want to set the value of all of them (they all have class .date-popup-init) to the value of the first field (#edit-field, the 'from' date) when that field is set. my code so far: <script type="text/javascript"> var DatePicked = function() { var firstdate = $("#edit-field"); var updater = firstdate.datepicker("getDate"); $(".date-popup-init").each(function(){ $(this).datepicker("setDate", updater); }); } $(function() { $("#edit-field").datepicker({ onSelect: DatePicked }); }); </script> this seems to randomly work; it sets the date of some fields to the value of #edit-field, seemingly different fields each time. also, the form adds more datepicker-enabled fields via ajax. is there any way to ensure that all these new fields, when they load, pick up the value of #edit-field as well? disclaimer: last night was my first attempt at javascript of any kind. i have a basic idea now. the above was cobbled through countless google examples.

    Read the article

  • Codeigniter: Controller URI with Library

    - by Kevin Brown
    I have a working controller and library function, but I now need to pass a URI segment to the library for decision making, and I'm stuck. Controller: function survey($method) { $id = $this->session->userdata('id'); $data['member'] = $this->home_model->getUser($id); //Convert the db Object to a row array $data['manager'] = $data['member']->row(); $manager_id = $data['manager']->manager_id; $data['manager'] = $this->home_model->getUser($manager_id); $data['manager'] = $data['manager']->row(); if ($data['manager']->credits == '0') { flashMsg('warning',"You can't complete the assessment until your manager has purchased credit."); redirect('home','location'); } elseif ($data['manager']->test_complete == '3'){ flashMsg('warning',"You already completed the Assessment."); redirect('home','location'); } else{ $data['header'] = "Home"; $this->survey_form_processing->survey_form($this->_container,$data); } } Library: function survey_form($container) { if($method ==1){ $id = $this->CI->session->userdata('id'); // Setup fields for($i=1;$i<18;$i++){ $fields["a_".$i] = 'Question '.$i; } for($i=1;$i<17;$i++){ $fields["b_".$i] = 'Question '.$i; } $fields["company_name"] = "Company Name"; $fields['company_address'] = "company_address"; $fields['company_phone'] = "company_phone"; $fields['company_state'] = "company_state"; $fields['company_city'] = "company_city"; $fields['company_zip'] = "company_zip"; $fields['job_title'] = "job_title"; $fields['job_type'] = "job_type"; $fields['job_time'] = "job_time"; $fields['department'] = "department"; $fields['supervisor'] = "supervisor"; $fields['vision'] = "vision"; $fields['height'] = "height"; $fields['weight'] = "weight"; $fields['hand_dominance'] = "hand_dominance"; $fields['areas_of_fatigue'] = "areas_of_fatigue"; $fields['injury_review'] = "injury_review"; $fields['job_positive'] = "job_positive"; $fields['risk_factors'] = "risk_factors"; $fields['job_improvement_short'] = "job_improvement_short"; $fields['job_improvement_long'] = "job_improvement_long"; $fields["c_1"] = "Near Lift"; $fields["c_2"] = "Middle Lift"; $fields["c_3"] = "Far Lift"; $this->CI->validation->set_fields($fields); // Set Rules for($i=1;$i<18;$i++){ $rules["a_".$i]= 'hour|integer|max_length[2]'; } for($i=1;$i<17;$i++){ $rules["b_".$i]= 'hour|integer|max_length[2]'; } // Setup form default values $this->CI->validation->set_rules($rules); if ( $this->CI->validation->run() === FALSE ) { // Output any errors $this->CI->validation->output_errors(); } else { // Submit form $this->_submit(); } // Modify form, first load $this->CI->db->from('be_user_profiles'); $this->CI->db->where('user_id' , $id); $user = $this->CI->db->get(); $this->CI->db->from('be_survey'); $this->CI->db->where('user_id' , $id); $survey = $this->CI->db->get(); $user = array_merge($user->row_array(),$survey->row_array()); $this->CI->validation->set_default_value($user); // Display page $data['user'] = $user; $data['header'] = 'Risk Assessment Survey'; $data['page'] = $this->CI->config->item('backendpro_template_public') . 'form_survey'; $this->CI->load->view($container,$data); } else{ redirect('home','location'); } } My library function doesn't know what to do with Method...and I'm confused. Does it have something to do with instances in my library?

    Read the article

  • Jquery Ketchup Form Validation not initializing required fields

    - by Aaron R
    We are trying to implement jquery ketchup demos.usejquery.com/ketchup-plugin/ and use required fields for the name, email and phone fields we have included all the markup and I think I have it setup properly but the form fields are not validating... You can see my sample here... thx for any assistance I have been staring at this for hours... http://c5.dealercontrol.net/service/service-appointment/

    Read the article

  • Find duplicates lines based on some delimited fileds on line

    - by Oliv
    Hello, I have a file with lines having some fields delimited by "|". I have to extract the lines that are identical based on some of the fileds (i.e. find lines which contain the same values for fields 1,2,3 12,and 13) Other fields contents have no importance for searching but the whole extracted lines have to be complete. Can anyone tell me how I can do that in KSH scripting (By exemple a script with some arguments (order dependent) that define the fileds separator and the fields which have to be compared to find duplicates lines in input file ) Thanks in advance and kind regards Oli

    Read the article

  • Windows 8 Google Contacts Sync doesn't sync custom fields

    - by Nishant
    I installed Windows 8 Pro a couple days ago. In the in-built "People" app, since there were options to sync contacts with several third party services like Facebook, Linkedin etc., I wanted to sync my Google contacts to the People app. The sync was successful and all my contacts migrated properly. However, the age old problem of custom fields not syncing between Google/Apple/Windows apps is still present. If a field label in my Google contacts is 'iPhone', it doesn't sync! Nor do any other custom fields except 'home' or 'work' with numbers. Is there a solution to this or any other workaround?

    Read the article

  • Multiple fields from LINQ to Text Box

    - by Chuki2
    how can I pass value from selected field (LINQ) to textbox in winforms? If single fields, I just do like this var result = from row in dtValueBranch.AsEnumerable() where row.Field<int>("branchID") == idBranch select row.Field<string>("branchName"); StringBuilder sb = new StringBuilder(); foreach (string s in result) { sb.Append(s + Environment.NewLine); } tbBranch.Text = sb.ToString(); So this is the code LINQ to many fields var result = from row in dtValueBranch.AsEnumerable() where row.Field<int>("branchID") == idBranch select new { BranchName = row["branchName"].ToString(), branchTel = row["branchTel1"].ToString(), // And many more fields }; How can I to implement each fields to each textbox?

    Read the article

  • Office 2007 Mail Merge: How do I view field names instead of data?

    - by One Monkey
    I've just received a document which forms the basis of a mail merge as an attachment and I need to view the field names like they display in 2003 with the double chevrons e.g. <<titles>><<initials>><<surname>> However even though I get a dialogue as I open the docx file saying that it is going to attempt to merge from a file (which I don't have) and I cancel that operation the document still displays merge data e.g. Mr A Test Instead of the field names. I have clicked on the fields which turn grey to demonstrate that they are fields but I can't find a way to make it display the field names not the data. I don't even know where it's getting the data from as I don't have the data source file for the document to use.

    Read the article

  • In google app engine, how to iterate through form fields (python, wsgiref.handlers)

    - by MarcoB
    Using python and wsgiref.handlers, I can get a single variable from a form with self.handler.request.get(var_name), but how do I iterate through all form variables, be they from GET and POST? Is it something like this? for field in self.handler.request.fields: value = self.handler.request.get(field) Again, it should include both fields included in the POST and fields from the query string, as in a GET request. Thanks in advance folks...

    Read the article

  • Displaying conditional amount of fields in UI (Android)

    - by Sochin
    I am using layout xml documents for my ui controls. I need to create and remove these controls (input fields) on the fly, based on how many results I get back from my database. For each group, there can be 0..* fields and these are prepopulated from the database. Also, it would be good if I can invoke a method to create an additional field; something like the address book, where you can click + or - to add or remove a phone or other detail. In a "psuedo" style, I'm guessing something like this: Check database - How many of X are there [y]? Create Y fields. The user may then add new fields, so once I click submit i need to apply all of that to database. Any examples or hints greatly welcomed. Hope this make sense! :)

    Read the article

  • Relating text fields to check boxes in Java

    - by Finzz
    This program requires the user to login and request a database to access. The program then gets a connection object, searches through the database storing the column names into a vector for later use. The problem comes with implementing text fields to allow the user to search for specific values within the database. I can get the check boxes and text fields to appear using a gridlayout and add them to a panel. How do I relate the text fields to their appropriate check box? I've tried adding them to a vector, but then they can't also be added to the panel as well. I've searched for a way to name the text fields as the loop cycles through the column names, but it seems impossible to do without having them declared ahead of time. This can't be done either, as it's impossible to determine the attributes that the user will request. I just need to be able to know the names of the text fields so I can test to see if the user entered information and perform the necessary logic. Let me know if you have to see the rest of the code to give an answer, but hopefully you get the general idea of what I'm trying to accomplish. Picture of UI: try { ResultSet r2 = con.getMetaData().getColumns("", "", rb.getText(), ""); colNames1 = new Vector<String>(); columns1 = new Vector<JCheckBox>(); while (r2.next()) { colNames1.add(r2.getString(4)); JCheckBox cb = new JCheckBox(r2.getString(4)); JTextField tf = new JTextField(10); columns1.add(cb); p3.add(cb); p3.add(tf); } }

    Read the article

  • Disable Dojo validation on certain fields

    - by Eric LaForce
    I would like to disable client side validation on certain fields in my user form. Currently I have two sets of fields that are displayed depending on the value of a previous drop down list. i.e. if the drop down list is set to value "A" 1 new field appears in the form. If the drop down list is set to value "B" 3 new fields appear in the form (mutually exclusive from the new form field when "A" is selected). Currently my Dojo client side validation fails because the fields that are not shown to the user (and thus no data can be inserted into those fields) fails to validate. Currently I determined that I can set the "validate" attribute to return true like so: <input type="text" id="companycity" name="companycity" class="textinput" value="<?php echo set_value('companycity'); ?>" style="<?php if(isset($errorData['companycity'])){echo $errorData['companycity'];} ?>" dojotype="dijit.form.ValidationTextBox" required="true" trim="true" validate='return true'" regexp="([a-zA-Z]{1,25})" invalidMessage="Invalid value. Must be between 1 and 25 alphabetic characters long."> This fixes my issue for hidden fields. However this now means that no validation is performed when this field becomes visible to the user (i.e. the validate attribute is still set to return true). I have tried removing the validate property when a field is displayed to the user like so: dijit.byId('companycode').attr('validate',''); This just set the attribute to nothing. This however gives errors in firebug saying validate method not found, so I take that to mean I did not remove this attribute correctly or removing this attribute is not the appropriate way to do this. I have also looked at overriding the validator method here but this doesnt seem like what I want either. I do not want to have to rewrite all the validation methods in place of dojo's. I just want dojo not to validate if the field is not visible to the user. Thanks for any advice or help.

    Read the article

  • j query validation plugin for two fields

    - by jonathan p
    I am using the Jquery Validation plug-in, however i need to add a "custom rule", i have 2 date fields and i need to ensure that the end date is not less than the start date. My problem is how to pass the two fields in as elements. As i understand u set up a custom function something like this : function customValidationMethod(value, element, params){ } But can't see how i could use it with two fields, if anyone has any ideas it would be greatly appreciated.

    Read the article

  • Index a mysql table of 3 integer fields

    - by Doori Bar
    I have a mysql table of 3 integer fields. None of the fields have a unique value - but the three of them combined are unique. When I query this table, I only search by the first field. Which approach is recommended for indexing such table? Having a multiple-field primary key on the 3 fields, or setting an index on the first field, which is not unique? Thanks, Doori Bar

    Read the article

  • Creating fillable PDF form with dynamically updated fields

    - by Aputsiaq
    Is there a way to create fillable PDF forms where a set of fields gets their data when one of the fields is filled out? The normal use case would be application form, where your name or membership number has to be entered on the top of each page. I am using LibreOffice 3.5.4.2. In a earlier version I was able to get the desired effect if I left the field names to be the same (i.e. the field names as seen in the Form Navigator). I'm open for using any free software tool. There is a similiar question asked elsewhere at ask.libreoffice.org.

    Read the article

  • How to structure a Kohana MVC application with dynamically added fields and provide validation and f

    - by Matt H
    I've got a bit of a problem. I have a Kohana application that has dynamically added fields. The fields that are added are called DISA numbers. In the model I look these up and the result is returned as an array. I encode the array into a JSON string and use JQuery to populate them The View knows the length of the array and so creates as many DISA elements as required before display. See the code below for a summary of how that works. What I'm finding is that this is starting to get difficult to manage. The code is becoming messy. Error handling of this type of dynamic content is ending up being spread all over the place. Not only that, it doesn't work how I want. What you see here is just a small snippet of code. For error handling I am using the validation library. I started by using add_rules on all the fields that come back in the post. As they are always phone numbers I set a required rule (when it's there) and a digit rule on the validation-as_array() keys. That works. The difficulty is actually giving it back to the view. i.e. dynamically added javascript field. Submits back to form. Save contents into a session. View has to load up fields from database + those from the previous post and signal the fields that have problems. It's all quite messy and I'm getting this code spread through both the view the controller and the model. So my question is. Have you done this before in Kohana and how have you handled it? There must be an easier way right? Code snippet. -- edit.php -- public function phone($id){ ... $this->template->content->disa_numbers = $phones->fetch_disa_numbers($this->account, $id); ... } -- phones.php -- public function fetch_disa_numbers($account, $id) { $query = $this->db->query("SELECT id, cid_in FROM disa WHERE owner_ext=?", array($id)); if (!$query){ return ''; } return $query; } -- edit_phones.php --- <script type="text/javascript"> var disaId = 1; function delDisaNumber(element){ /* Put 'X_' on the front of the element name to mark this for deletion */ $(element).prev().attr('name', 'X_'+$(element).prev().attr('name')); $(element).parent().hide(); } function addDisaNumber(){ /* input name is prepended with 'N_' which means new */ $("#disa_numbers").append("<li><input name='N_disa"+disaId+"' id='disa'"+ "type='text'/><a class='hide' onClick='delDisaNumber(this)'></a></li>"); disaId++; } </script> ... <php echo form::open("edit/saveDisaNumbers/".$phone, array("class"=>"section", "id"=>"disa_form")); echo form::open_fieldset(array("class"=>"balanced-grid")); ?> <ul class="fields" id="disa_numbers"> <?php $disaId = 1; foreach ( $disa_numbers as $disa_number ){ echo '<li>'; echo form::input('disa'.$disaId, $disa_number->cid_in); echo'<a class="hide" onclick="delDisaNumber(this)"></a>'; echo "</li>"; $disaId++; } ?> </ul> <button type="button"onclick="addDisaNumber()"><a class="add"></a>Add number</button> <?php echo form::submit('submit', 'Save'); echo form::close(); ?>

    Read the article

  • Are Java's public fields just a tragic historical design flaw at this point?

    - by Avi Flax
    It seems to be Java orthodoxy at this point that one should basically never use public fields for object state. (I don't necessarily agree, but that's not relevant to my question.) Given that, would it be right to say that from where we are today, it's clear that Java's public fields were a mistake/flaw of the language design? Or is there a rational argument that they're a useful and important part of the language, even today? Thanks! Update: I know about the more elegant approaches, such as in C#, Python, Groovy, etc. I'm not directly looking for those examples. I'm really just wondering if there's still someone deep in a bunker, muttering about how wonderful public fields really are, and how the masses are all just sheep, etc. Update 2: Clearly static final public fields are the standard way to create public constants. I was referring more to using public fields for object state (even immutable state). I'm thinking that it does seem like a design flaw that one should use public fields for constants, but not for state… a language's rules should be enforced naturally, by syntax, not by guidelines.

    Read the article

  • SHAREPOINT: Custom Field type property storage defined for custom field

    - by Eric Rockenbach
    ok here is a great question. I have a set of generic custom fields that are highly configurable from an end user perspective and the configuration is getting overbearing as there are nearly 100 plus items each custom field allows you to perform in the areas of Server/Client Validation, Server/Client Events/Actions, Server/Client Bindings parent/child, display properties for form/control, etc, etc. Right now I'm storing most of these values as "Text" in my field xml for my propertyschema. I'm very familiar with the multi column value, but this is not a complex custom type in sense it's an array. I also considered creating serilzable objects and stuffing them into the text field and then pulling out and de-serilizing them when editing through the field editor or acting on the rules through the custom spfield. So I'm trying to take the following for example <PropertySchema> <Fields> <Field Name="EntityColumnName" Hidden="TRUE" DisplayName="EntityColumnName" MaxLength="500" DisplaySize="200" Type="Text"> <default></default> </Field> <Field Name="EntityColumnParentPK" Hidden="TRUE" DisplayName="EntityColumnParentPK" MaxLength="500" DisplaySize="200" Type="Text"> <default></default> </Field> <Field Name="EntityColumnValueName" Hidden="TRUE" DisplayName="EntityColumnValueName" MaxLength="500" DisplaySize="200" Type="Text"> <default></default> </Field> <Field Name="EntityListName" Hidden="TRUE" DisplayName="EntityListName" MaxLength="500" DisplaySize="200" Type="Text"> <default></default> </Field> <Field Name="EntitySiteUrl" Hidden="TRUE" DisplayName="EntitySiteUrl" MaxLength="500" DisplaySize="200" Type="Text"> <default></default> </Field> </Fields> <PropertySchema> And turn it into this... <PropertySchema> <Fields> <Field Name="ServerValidationRules" Hidden="TRUE" DisplayName="ServerValidationRules" Type="ServerValidationRulesType"> <default></default> </Field> </Fields> <PropertySchema> Ideas?????

    Read the article

  • Issue tabbing between fields in Tiddlywiki

    - by leeand00
    TAB and SHIFT + TAB are great for getting in and out of fields without taking your hands off the keyboard. In my Firefox 9.0 installation I installed and then disabled Tab in Textarea 0.10.2 (tabinta) and now when I try to tab in and out of a textarea on the page using TAB and SHIFT + TAB it gives me a tab instead of the expected movement in and out of the textarea. Is there some way I can get this functionality back to normal?

    Read the article

  • Excel 2007 | Remove blank fields from pivot tables

    - by answertips
    Every time I create a pivot table (available for all Excel versions) I get one or several blank fields. How can I get rid of them? One workaround I used was to select the blank field, right click | Filter | Hide Selected Items. This can solve my problem but I need to do it manually... Is there a way to automatically hide/exclude the blanks?

    Read the article

  • Custom metadata fields in Windows file manager (or other software)

    - by Dave Gaebler
    I'm trying to organize a collection of maybe 500 or so journal articles, stored in a combination of .pdf and .djvu formats. I'd like to be able to sort the collection by author(s), title, journal name, year, and subject keywords. Is there a way to create metadata fields for this information in the Windows file system (similar to how .mp3 files come with tags for album, title, track length, etc)? Or, if not, is there some software (preferably free) that can do something similar?

    Read the article

  • Extjs - Dynamically generate fields in a FormPanel

    - by Benjamin
    Hi all, I've got a script that generates a form panel: var form = new Ext.FormPanel({ id: 'form-exploit-zombie-'+zombie_ip, formId: 'form-exploit-zombie-'+zombie_ip, border: false, labelWidth: 75, formBind: true, defaultType: 'textfield', url: '/ui/modules/exploit/new', autoHeight: true, buttons:[{ text: 'Execute exploit', handler: function() { var form = Ext.getCmp('form-exploit-zombie-'+zombie_ip); form.getForm().submit({ waitMsg: 'Running exploit ...', success: function() { Ext.beef.msg('Yeh!', 'Exploit sent to the zombie.') }, failure: function() { Ext.beef.msg('Ehhh!', 'An error occured while trying to send the exploit.') } }); } }] }); that same scripts then retrieves a json file from my server which defines how many input fields that form should contain. The script then adds those fields to the form: Ext.each(inputs, function(input) { var input_name; var input_type = 'TextField'; var input_definition = new Array(); if(typeof input == 'string') { input_name = input; var field = new Ext.form.TextField({ id: 'form-zombie-'+zombie_ip+'-field-'+input_name, fieldLabel: input_name, name: 'txt_'+input_name, width: 175, allowBlank:false }); form.add(field); } else if(typeof input == 'object') { //input_name = array_key(input); for(definition in input) { if(typeof definition == 'string') { } } } else { return; } }); Finally, the form is added to the appropriate panel in my interface: panel.add(form); panel.doLayout(); The problem I have is: when I submit the form by clicking on the button, the http request sent to my server does not contain the fields added to the form. In other words, I'm not posting those fields to the server. Anyone knows why and how I could fix that? Thanks for your time.

    Read the article

  • WCF Datacontract, some fields do not deserialize

    - by jhersh
    Problem: I have a WCF service setup to be an endpoint for a call from an external system. The call is sending plain xml. I am testing the system by sending calls into the service from Fiddler using the RequestBuilder. The issue is that all of my fields are being deserialized with the exception of two fields. price_retail and price_wholesale. What am I missing? All of the other fields deserialize without an issue - the service responds. It is just these fields. XML Message: <widget_conclusion> <list_criteria_id>123</list_criteria_id> <list_type>consumer</list_type> <qty>500</qty> <price_retail>50.00</price_retail> <price_wholesale>40.00</price_wholesale> <session_id>123456789</session_id> </widget_conclusion> Service Method: public string WidgetConclusion(ConclusionMessage message) { var priceRetail = message.PriceRetail; } Message class: [DataContract(Name = "widget_conclusion", Namespace = "")] public class ConclusionMessage { [DataMember(Name = "list_criteria_id")] public int CriteriaId { get; set;} [DataMember(Name = "list_type")] public string ListType { get; set; } [DataMember(Name = "qty")] public int ListQuantity { get; set; } [DataMember(Name = "price_retail")] public decimal PriceRetail { get; set; } [DataMember(Name = "price_wholesale")] public decimal PriceWholesale { get; set; } [DataMember(Name = "session_id")] public string SessionId { get; set; } }

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >