Search Results

Search found 21 results on 1 pages for 'formbuilder'.

Page 1/1 | 1 

  • Trying to extend ActionView::Helpers::FormBuilder

    - by nibbo
    Hello I am trying to DRY up some code by moving some logic into the FormBuilder. After reading the documentation about how to select and alternative form builder the logical solution for me seemed to be something like this. In the view <% form_for @event, :builder => TestFormBuilder do |f| %> <%= f.test %> <%= f.submit 'Update' %> <% end %> and then in app/helpers/application_helper.rb module ApplicationHelper class TestFormBuilder < ActionView::Helpers::FormBuilder def test puts 'apa' end end end This, however, gives me an error at the "form_for" uninitialized constant ActionView::Base::CompiledTemplates::TestFormBuilder Where am I doing it wrong?

    Read the article

  • Looking for a FormBuilder that gives me all images and sourcecode to my form

    - by Tracy Anne
    Wow, I started my search this morning and didn't think it would be so difficult to find. I'm just tired of spending hours putting together simple html forms in dreamweaver. I'm an enthusiast web developer mostly focused on php and mysql. I hate CSS and HTML and I'm looking for a simple program that will put a form together for me where I can then completely embed the form into my site. I'll do all of the programming to attach it to my database I just need the form and images. I've looked into jotform, wufoo, 123forms etc but it seems like they all want to keep my form on their servers in one way or another. It looked like jotform had a developers version but $450 bucks is a little steep for a part timer like me. Is there no simple software out there that will throw a nice stylized form together for me?

    Read the article

  • implicit argument passing of super from method defined by define_method() is not supported. Specify

    - by jaycode
    Most of you should already know Pragmatic book's "Agile web dev with rails" (third edition). On page 537 - 541 it has "Custom Form Builders" code as follows: class TaggedBuilder < ActionView::Helpers::FormBuilder # <p> # <label for="product_description">Description</label><br/> # <%= form.text_area 'description' %> #</p> def self.create_tagged_field(method_name) define_method(method_name) do |label, *args| @template.content_tag("p" , @template.content_tag("label" , label.to_s.humanize, :for => "#{@object_name}_#{label}") + "<br/>" + super) end end field_helpers.each do |name| create_tagged_field(name) end end This code doesn't work with Ruby 1.9.1. It returns error as follows: implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly. (ActionView::TemplateError) My question is: What should I change in the code to fix this? Thank you

    Read the article

  • Ajax get throws a syntax error when ip is given instead of localhost

    - by Aruna
    Hi , i am working on cakephp. I have developed an application where i have used localhost in all ajax post and get.. like var ht = $.ajax({ type: "GET", url: "http://localhost/FormBuilder/index.php/forms/getInvitees/<?php echo $emailid;?>", async: false }).responseText; var myObject = eval('(' + ht + ')'); this thing works only when i put localhost . But when i change that to my Ip like http://111.11.11.11/FormBuilder/index.php/forms/getInvitees/", then i am getting a syntax error () in the line var myObject = eval('(' + ht + ')'); WHy it happens ?? Please give valuable suggestions in solving this.. Thank you

    Read the article

  • Setting baseurl in cakephp

    - by Aruna
    Hi, I am working on an appliication which is running in cakephp and i am using ajax query inbetween. In all the cases for all the ajax post i have used the url as var ht = $.ajax({ type: "GET", url: "http://172.20.52.99/FormBuilder/index.php/forms/viewChoices/"+attribute_id, async: false }).responseText; var myObject = eval('(' + ht + ')'); is there any way in cakephp where i can give my base url as http://172.20.52.99/FormBuilder/index.php/ and to call the baseurl in all the places i want. Please give some suggestions . Thank you..

    Read the article

  • How to get correct children ids using fields_for "parents[]", parent do |f| using f.fields_for :children, child ?

    - by Anatortoise House
    I'm editing multiple instances of a parent model in an index view in one form, as in Railscasts #198. Each parent has_many :children and accepts_nested_attributes_for :children, as in Railscasts #196 and #197 <%= form_tag %> <% for parent in @parents %> <%= fields_for "parents[]", parent do |f| <%= f.text_field :job %> <%= f.fields_for :children do |cf| %> <% cf.text_field :chore %> <% end %> <% end %> <% end %> <% end %> Given parent.id==1 f.text_field :job correctly generates <input id="parents_1_job" type="text" value="coding" size="30" name="parents[1][job]"> But cf.text_field :chore generates ids and names that don't have the parent index. id="parents_children_attributes_0_chore" name="parents[children_attributes][0][chore]" If I try passing the specific child object to f.fields_for like this: <% for child in parent.children %> <%= f.fields_for :children, child do |cf| %> <%= cf.text_field :chore %> <% end %> <% end %> I get the same. If I change the method from :children to "[]children" I get id="parents_1___children_chore" which gets the right parent_index but doesn't provide an array slot for the child index. "[]children[]" isn't right either: id="parents_1__children_3_chore" as I was expecting attributes_0_chore instead of 3_chore. Do I need to directly modify an attribute of the FormBuilder object, or subclass FormBuilder to make this work, or is there a syntax that fits this situation? Thanks for any thoughts.

    Read the article

  • Symfony2 bindrequest error

    - by user1321109
    namespace Topxia\LiftBundle\Form; use Symfony\Component\Validator\Constraint as Assert; class AddUser { /** * @Assert\NotBlank(message="???????") */ public $username; /** * @Assert\NotBlank(message="????????") */ public $name; /** * @Assert\NotBlank(message="??????") * @Assert\MinLength(limit=4,message="?????") * @Assert\MaxLength(limit=24,message="?????") */ public $password; /** * @Assert\NotBlank(message="??????") */ public $rpassword; /** * @Assert\NotBlank(message="???????") * @Assert\Email(message="???????") */ public $email; /** * @Assert\NotBlank(message="k3????????") */ public $num; /** * @Assert\NotBlank() * @Assert\Choice({"0", "1", "2", "3", "4"}) */ public $roles; public $changePassword; } namespace Topxia\LiftBundle\Form; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilder; class AddUserType extends AbstractType{ public function buildForm(FormBuilder $builder, array $options){ $builder->add('username', 'text', array('label' => '????')); $builder->add('name', 'text', array('label' => '???')); $builder->add('password', 'password', array('label' => '??')); $builder->add('rpassword', 'password', array('label' => '????')); $builder->add('email', 'email', array('label' => '??')); $builder->add('num', 'text', array('label' => 'K3????')); $builder->add('roles', 'choice', array('label' => '???', 'multiple' => false, 'expanded' => true, 'choices' => array( '0' => '?????', '1' => '?????', '2' => '?????', '3' => '???', '4' => '???' ), )); $builder->add('changePassword', 'checkbox', array('label' => '??????', 'value' => '1')); } public function getName(){ return 'add_user'; } } when i use $form-bindRequest($request); in conctollor there is an error : [Semantical Error] The annotation "@Symfony\Component\Validator\Constraint\NotBlank" in property Topxia\LiftBundle\Form\AddUser::$username does not exist, or could not be auto-loaded. 500 Internal Server Error - AnnotationException I have no idea about this. Thanks

    Read the article

  • How to get the value of the input element of live of Value

    - by Aruna
    HI, i am having a Input hidden element like in my JQuery i am setting the value for the above input type after some ajax call like EDIT::: $.ajax({ type: "POST", url: "http://localhost/FormBuilder/index.php/forms/saveForm/", async: false, data: "formname="+formname+"&status="+status, success: function(msg){$("#FormID").val(msg); }//success });//ajax Now somewhere in the code after this i want to fetch the value of this FIeld.How to get this value on live of value for this input type.. EDIT::: i am retriving like by var FORMID=$("#FormID").val();//but shows null How to get the value of it on live of this Input element

    Read the article

  • How to get the selected option value of a drop down box in PHP code

    - by Angeline Aarthi
    I have a dropdown box which lists a set of logos,like flower,butterfly etc. <p class="title1">Logo</p> <select name="logoMenu" class="select" size="7"> <?php foreach($logos as $logo):?> <option id="<?php echo $logo['Subproperty']['id'];?>" value="<?php echo $logo['Subproperty']['values'];?>"><?php echo $logo['Subproperty']['values'];?> </option> <?php endforeach;?> </select> Suppose If I select the logo 'Flower' from the drop down box, I want the flower pic to be displayed in a div.This is the div that I have to display the pictures. <div id="theme_logos" class="float_left spaceleft" style="display:none;"> <?php foreach($defaultLogos as $logo): //if($logo['Subproperty']['values']==clicked option value){?> <img height="50" width="50" src="/FormBuilder/app/webroot/img/themes/<?php echo $logo['Subproperty']['images'];?>" class="float_left user_profile_image user_profile_image" alt="Default50"/> <?php endforeach;?> </div> The problem with this code is that it displaya all the pictures found in the table. Because im My controller code, I give only the property id as that of 'Logo',but do not give which logo. $this->set('defaultLogos',$this->Subproperty->find('all',array('conditions'=>array('Subproperty.property_id'=>1,'Subproperty.values'=>"Flower")))); Here I have hard coded as 'flower' so that I get the flower picture alone.. If I select the logo from the drop down box, how to pass that selected value to the controller code? Or if I get the selected logo name thro' jquery,how to use that value in the if condition inside the for each loop? someone help me out with this.. I'm using CakePHP framework. $("#logoMenu option").click(function(){ selectedLogo=$(this).attr("value"); $('#subproperty_id').val($(this).attr("id")); if(selectedLogo=="Your logo"){ $("#themes_upload").show(); } else{ alert(selectedLogo); $("#themes_upload").hide(); $("#theme_logos").show(); } }); EDIT Now I have tried an ajax post where I pass the selected logo to the same action of the controller. I get the value when I alert the passed value in the success function of the ajax function. I the picture doesn't appear. $("#logoMenu option").click(function(){ selectedLogo=$(this).attr("value"); $('#subproperty_id').val($(this).attr("id")); if(selectedLogo=="Your logo"){ $("#themes_upload").show(); } else{ alert(selectedLogo); $.ajax({ type: "POST", url: "http://localhost/FormBuilder/index.php/themes/themes/", async: false, data: "selectedLogo="+selectedLogo, success: function(msg){ alert( "Data Saved: " + msg); } }); $("#themes_upload").hide(); $("#theme_logos").show(); } }); function themes(){ $this->set('themes',$this->Theme->find('all')); $logo=$this->params['form']['selectedLogo']; echo "logo:".$logo; $this->set('defaultLogos',$this->Subproperty->find('all',array('conditions'=>array('Subproperty.property_id'=>1,'Subproperty.values'=>$logo)))); } But when I trry to display the img in the page,it doesn't appear. Is it because the div show command is after the ajax request?

    Read the article

  • pass form builder in remote_function in rails ?

    - by richard moss
    hi all i have select box where on change i need to grab the value and via remote function get some field names from db and then generate those field further down the form depwning on whatoption from the select box is chosen. The problem is is that the fields are in a f.form_for so are using the formbuilder f that has the select box in. So when i render the partial via ajax in the controller i get an error as i dont have a reference to the local form builder f. does anyone know how or if i can get reference to the form builder orif can pass it in a remote function call and then pass into my locals in the partial ? thanks alot, any help will be great as been stuck on this a long time! cheers rick

    Read the article

  • Add CSS to Form Type is Symfony2

    - by Umair Iqbal
    I have an edit form, The form is made through symfony2 Form types. I checked the documentation but couldn't find any option for adding CSS to the form. The form display the data correctly and everything is fine what I want to do is to add styling to each field. My Edit Type is public function buildForm(FormBuilder $builder, array $options) { $builder ->add('id', 'hidden') ->add('patent_name', 'text', array('label' => 'Patent Name')) ->add('description', 'textarea', array('label' => 'Description', 'required' => false)) ->add('appln_auth','text', array('label' => 'Application Authorization')) ; } Anyone has any idea ho I can add css ? Thanks

    Read the article

  • Create combined client side and server side validation in Symfony2

    - by ausi
    I think it would be very useful to create client side form validation up on the symfony2 Form and Validator components. The best way to do this would be to pass the validation constraints to the form view. With that information it would be possible to make a template that renders a form field to something like this: <div> <label for="form_email">E-Mail</label> <input id="form_email" type="text" name="form[email]" value="" data-validation-constraints='["NotBlank":{},"MinLength":{"limit":6}]' /> </div> The JavaScript part then would be to find all <input> elements that have the data-validation-constraints attribute and create the correct validation for them. To pass the validation constraints to the form view i thought the best way would be to create a form type extension. That's the point of my Question: Is this the correct way? And how is this possible? At the Moment my form type extension looks like this: use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\Form\FormBuilder; class FieldTypeExtension extends \Symfony\Component\Form\AbstractTypeExtension{ public function getExtendedType(){ return 'field'; } public function buildView(FormView $view, FormInterface $form) { // at this point i didn't find a way to get the // validation constraints out of the $form // the `getAllValidationConstraints` here is just an example $view->set('validation_constraints', $form->getAllValidationConstraints()); } } How can i get all validation constraints applied to one form field out of the FormInterface object?

    Read the article

  • Skip HTML escape in custom label_tag helper in Rail 3

    - by tricote
    Hi, I have this nice class ErrorFormBuilder that allows me to add the error description near the corresponding field in the form view : class ErrorFormBuilder < ActionView::Helpers::FormBuilder #Adds error message directly inline to a form label #Accepts all the options normall passed to form.label as well as: # :hide_errors - true if you don't want errors displayed on this label # :additional_text - Will add additional text after the error message or after the label if no errors def label(method, text = nil, options = {}) #Check to see if text for this label has been supplied and humanize the field name if not. text = text || method.to_s.humanize #Get a reference to the model object object = @template.instance_variable_get("@#{@object_name}") #Make sure we have an object and we're not told to hide errors for this label unless object.nil? || options[:hide_errors] #Check if there are any errors for this field in the model errors = object.errors.on(method.to_sym) if errors #Generate the label using the text as well as the error message wrapped in a span with error class text += " <br/><span class=\"error\">#{errors.is_a?(Array) ? errors.first : errors}</span>" end end #Add any additional text that might be needed on the label text += " #{options[:additional_text]}" if options[:additional_text] #Finally hand off to super to deal with the display of the label super(method, text, options) end end But the HTML : text += " <br/><span class=\"error\">#{errors.is_a?(Array) ? errors.first : errors}</span>" is escaped by default in the view... I tried to add the {:escape = false} option : super(method, text, options.merge({:escape => false})) without success Is there any way to bypass this behavior ? Thanks

    Read the article

  • Why does my Perl CGI program fail with "Software error: ..."?

    - by kiran
    When I try to run my Perl CGI program, the returned web page tells me: Software error: For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error. Here is my code in one of the file: #!/usr/bin/perl use lib "/home/ecoopr/ecoopr.com/CPAN"; use CGI; use CGI::FormBuilder; use CGI::Session; use CGI::Carp (fatalsToBrowser); use CGI::Session; use HTML::Template; use MIME::Base64 (); use strict; require "./db_lib.pl"; require "./config.pl"; my $query = CGI-new; my $url = $query-url(); my $hostname = $query-url(-base = 1); my $login_url = $hostname . '/login.pl'; my $redir_url = $login_url . '?d=' . $url; my $domain_name = get_domain_name(); my $helpful_msg = $query-param('m'); my $new_trusted_user_fname = $query-param('u'); my $action = $query-param('a'); $new_trusted_user_fname = MIME::Base64::decode($new_trusted_user_fname); ####### Colin: Added July 12, 2009 ####### my $view = $query-param('view'); my $offset = $query-param('offset'); ####### Colin: Added July , 2009 ####### #print $session-header; #print $new_trusted_user; my $helpful_msg_txt = qq[]; my $helpful_msg_div = qq[]; if ($helpful_msg)

    Read the article

  • customized form_for tag in rails

    - by poseid
    I want to make a table within a form by making a new form_tag. The following code in ApplicationHelper fails: module ApplicationHelper class TabularFormBuilder < ActionView::Helpers::FormBuilder # ... code to insert <tr> tags </tr> end def tabular_form_for(name, object = nil, options = nil, &proc) concat("<table>", proc.binding) form_for(name, object, (options||{}).merge(:builder => TabularFormBuilder), &proc) concat("</table>", proc.binding) end end The view I use is: <h1>New project</h1> <% tabular_form_for :project, :builder => ApplicationHelper::TabularFormBuilder do |f| %> <%= f.error_messages %> <%= f.text_field :name %> <%= f.text_area :description %> <%= f.text_field :location %> <%= f.submit 'Create' %> <% end %> The error I get is: NoMethodError in Projects#new Showing app/views/projects/new.html.erb where line #5 raised: undefined method `errors' for {:builder=ApplicationHelper::TabularFormBuilder}:Hash Any ideas how to make this custom tag work?

    Read the article

  • Symfony2: validate an object that is not an entity

    - by Marronsuisse
    I am using CraueFormFlowBundle to have a multiple page form, and am trying to do some validation on some of the fields but can't figure out how to do this. The object that needs to be validated isn't an Entity, which is causing me trouble. I tried adding a collectionConstraint in the getDefaultOption function of my form type class, but this doesn't work as I get the "Expected argument of type array or Traversable and ArrayAccess" error. I tried with annotations in my object class, but they don't seem to be taken into account. Are annotations taken into account if the class isn't an entity? (i set enable_annotations to true) Anyway, what is the proper way to do this? Basically, I just want to validate that "age" is an integer... class PoemDataCollectorFormType extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { switch ($options['flowStep']) { case 6: $builder->add('msgCategory', 'hidden', array( )); $builder->add('msgFIB','text', array( 'required' => false, )); $builder->add('age', 'integer', array( 'required' => false, )); break; } } public function getDefaultOptions(array $options) { $options = parent::getDefaultOptions($options); $options['flowStep'] = 1; $options['data_class'] = 'YOP\YourOwnPoetBundle\PoemBuilder\PoemDataCollector'; $options['intention'] = 'my_secret_key'; return $options; } } EDIT: add code, handle validation with annotations As Cyprian, I was pretty sure that using annotations should work, however it doesn't... Here is how I try: In my Controller: public function collectPoemDataAction() { $collector = $this->get('yop.poem.datacollector'); $flow = $this->get('yop.form.flow.poemDataCollector'); $flow->bind($collector); $form = $flow->createForm($collector); if ($flow->isValid($form)) { .... } } In my PoemDataCollector class, which is my data class (service yop.poem.datacollector): class PoemDataCollector { /** * @Assert\Type(type="integer", message="Age should be a number") */ private $age; } EDIT2: Here is the services implementation: The data class (PoemDataCollector) seems to be linked to the flow class and not to the form.. Is that why there is no validation? <service id="yop.poem.datacollector" class="YOP\YourOwnPoetBundle\PoemBuilder\PoemDataCollector"> </service> <service id="yop.form.poemDataCollector" class="YOP\YourOwnPoetBundle\Form\Type\PoemDataCollectorFormType"> <tag name="form.type" alias="poemDataCollector" /> </service> <service id="yop.form.flow.poemDataCollector" class="YOP\YourOwnPoetBundle\Form\PoemDataCollectorFlow" parent="craue.form.flow" scope="request"> <call method="setFormType"> <argument type="service" id="yop.form.poemDataCollector" /> </call> </service> How can I do the validation while respecting the craueFormFlowBundle guidelines? The guidelines state: Validation groups To validate the form data class a step-based validation group is passed to the form type. By default, if getName() of the form type returns registerUser, such a group is named flow_registerUser_step1 for the first step. Where should I state my constraint to use those validation groups..? I tried: YOP\YourOwnPoetBundle\PoemBuilder\Form\Type\PoemDataCollectorFormType: properties: name: - MinLength: { limit: 5, message: "Your name must have at least {{ limit }} characters.", groups: [flow_poemDataCollector_step1] } sex: - Type: type: integer message: Please input a number groups: [flow_poemDataCollector_step6] But it is not taken into acount.

    Read the article

  • Ruby on Rails can't find 'label'

    - by msandbot
    Hi trying to make a Registration page with Ruby on rails using the tutorial found here http://rails.francik.name/week4.html having trouble getting the page to work after adding <h1>Register</h1> <enter code here%= error_messages_for :user %> <% form_for :user do |f| %> <p> <%= f.label :screen_name %>: <%= f.text_field :screen_name %> </p> <p> <%= f.label :e_mail, "E-Mail" %>: <%= f.text_field :e_mail %> </p> <p> <%= f.label :password %>: <%= f.password_field :password %> </p> <p> <%= f.submit "Register" %> </p> <% end %> to the register.rhtml file when loaded I get NoMethodError in User#register Showing app/views/user/register.rhtml where line #5 raised: undefined method `label' for #<ActionView::Helpers::FormBuilder:0x275ef48> the application trace is #{RAILS_ROOT}/app/views/user/register.rhtml:5:in `_run_rhtml_47app47views47user47register46rhtml' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:151:in `fields_for' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_helper.rb:127:in `form_for' #{RAILS_ROOT}/app/views/user/register.rhtml:3:in `_run_rhtml_47app47views47user47register46rhtml' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:326:in `compile_and_render_template' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:301:in `render_template' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:260:in `render_file' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:806:in `render_file' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:711:in `render_with_no_layout' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/layout.rb:247:in `render_without_benchmark' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:in `render' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/1.8/benchmark.rb:293:in `measure' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:50:in `render' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:1096:in `perform_action_without_filters' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:632:in `call_filter' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in `perform_action_without_benchmark' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/1.8/benchmark.rb:293:in `measure' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in `perform_action' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:430:in `process_without_filters' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `synchronize' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process_client' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process_client' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `new' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `initialize' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243 /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/bin/mongrel_rails:16:in `load' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/i386/bin/mongrel_rails:16

    Read the article

  • Inflector::humanize($key) converts Date of joining TO Date Of Joining

    - by Aruna
    Hi, I have a Form and i am submitting them like using function submit($formid = null,$fillerid=null) { $this->data['Result']['form_id']=$formid; $this->data['Result']['submitter_id']=$fillerid; $this->data['Result']['submitter']=$this->Session->read('filler'); echo "submitter: ".$this->Session->read('filler'); $results=$this->Form->hasResults($this->data); //echo http_build_query($_POST); if(empty($results)){ foreach ($_POST as $key => $value): if(is_array($value)){ $value = implode('', $_POST[$key]); $this->data['Result']['value']=$value; } else{ $this->data['Result']['value']=$value; } $this->data['Result']['form_id']=$formid; $this->data['Result']['submitter_id']=$fillerid; $this->data['Result']['label']=Inflector::humanize($key); $this->data['Result']['submitter']=$this->Session->read('filler'); $this->Form->submitForm($this->data); endforeach; $this->Session->setFlash('Your entry has been submitted.'); } I am having A fORM LIKE <form method="post" action="/FormBuilder/index.php/forms/submit/1/4" id="ResultSubmit"> <div class="input text"><label for="1">Firstname</label><input type="text" value="" style="width: 300px;" id="1" name="Firstname"/></div> <br/> <div class="input text"><label for="2">Last Name</label><input type="text" value="" style="width: 300px;" id="2" name="Last Name"/></div> <br/> <div class="input text"><label for="3">Age</label><input type="text" value="" style="width: 200px;" id="3" name="Age"/></div> <br/> <center> <span id="errmsg3"/> </center> <div class="input textarea"><label for="4">Address</label><textarea style="height: 300px;" id="4" rows="6" cols="30" name="Address"/></div> <br/> <div class="input text"><label for="5">Date Of Joining</label><input type="text" value="" style="width: 300px;" id="5" name="Date of joining"/></div><br/> <div class="input text"><label for="6">Email - Id</label><input type="text" value="" style="width: 300px;" id="6" name="Email - id"/></div> <br/> <div class="input text"> <label for="7">Personal Number</label><input type="text" value="" maxlength="3" style="width: 30px;" id="7" name="Personal Number[]"/><input type="text" value="" style="width: 30px;" maxlength="3" id="7-1" name="Personal Number[]"/><input type="text" value="" style="width: 70px;" maxlength="4" id="7-2" name="Personal Number[]"/></div> <span id="errmsg7"/> <br/> <div class="input select"><label for="8">Gender</label><select id="8" name="Gender"> MaleFemale <div class="input text"><label for="9">Official Number</label><input type="text" value="" style="width: 200px;" id="9" name="Official Number"/></div><br/> <div class="input select"><label for="10">Experience</label><select id="10" name="Experience"> <option value="Fresher">Fresher</option><option yrs="" 5="" value="Below">Below 5 Yrs</option><option yrs="" 10="" value="Above">Above 10 yrs</option></select></div><br/> actually My input has the names as Firstname Last Name Age Address Date of joining Email - id Personal Number Gender Official Number But when i use Inflector::humanize($key) for saving the names which has white space characters they have converted into like Date Of Joining i.e.., O and J becomes Capital letters... But i need to save them as such as Date of joining.. How to do so???

    Read the article

  • PHP Pear Installation on CentOS

    - by Prabhakar
    [root@ip ~]# yum install php-pear* Reducing CentOS-5 Testing to included packages only Finished Setting up Install Process Package 1:php-pear-1.8.1-2.el5.centos.noarch already installed and latest versio n Package php-pear-XML-Util is obsoleted by php-pear, trying to install 1:php-pear -1.8.1-2.el5.centos.noarch instead Package 1:php-pear-1.8.1-2.el5.centos.noarch already installed and latest versio n Package php-pear-DB is obsoleted by php-pear-db, trying to install php-pear-db-1 .7.13-2.el5.rf.noarch instead Resolving Dependencies --> Running transaction check ---> Package php-pear-Auth-RADIUS.noarch 0:1.0.6-1.el5 set to be updated --> Processing Dependency: php-pecl(radius) >= 1.2.5 for package: php-pear-Auth- RADIUS --> Processing Dependency: php-mcrypt for package: php-pear-Auth-RADIUS ---> Package php-pear-Auth-SASL.noarch 0:1.0.4-1.el5 set to be updated ---> Package php-pear-Benchmark.noarch 0:1.2.7-1.el5 set to be updated ---> Package php-pear-CAS.noarch 0:1.1.3-1.el5 set to be updated --> Processing Dependency: php-domxml-php4-php5 for package: php-pear-CAS ---> Package php-pear-Cache-Lite.noarch 0:1.7.5-1.el5 set to be updated ---> Package php-pear-CodeGen.noarch 0:1.0.7-3.el5 set to be updated ---> Package php-pear-CodeGen-PECL.noarch 0:1.1.3-3.el5 set to be updated ---> Package php-pear-Console-CommandLine.noarch 0:1.1.3-3.el5 set to be updated ---> Package php-pear-Console-Getargs.noarch 0:1.3.5-1.el5 set to be updated ---> Package php-pear-Console-ProgressBar.noarch 0:0.5.2-0.2.beta.el5 set to be updated ---> Package php-pear-Console-Table.noarch 0:1.1.1-1.el5 set to be updated ---> Package php-pear-Crypt-Blowfish.noarch 0:1.0.1-1.el5 set to be updated ---> Package php-pear-Crypt-CHAP.noarch 0:1.0.2-1.el5 set to be updated ---> Package php-pear-DB-DataObject.noarch 0:1.8.12-1.el5 set to be updated ---> Package php-pear-DB-DataObject-FormBuilder.noarch 0:1.0.0-1.el5 set to be u pdated ---> Package php-pear-DB-QueryTool.noarch 0:1.1.2-1.el5 set to be updated ---> Package php-pear-Date.noarch 0:1.4.7-2.el5.centos set to be updated ---> Package php-pear-Date-Holidays.noarch 0:0.21.4-1.el5 set to be updated ---> Package php-pear-Date-Holidays-USA.noarch 0:0.1.1-1.el5 set to be updated ---> Package php-pear-Event-Dispatcher.noarch 0:1.1.0-1.el5 set to be updated ---> Package php-pear-File.noarch 0:1.2.2-1.el5.centos set to be updated ---> Package php-pear-File-Find.noarch 0:1.3.0-1.el5 set to be updated ---> Package php-pear-File-Passwd.noarch 0:1.1.7-1.el5 set to be updated ---> Package php-pear-File-SMBPasswd.noarch 0:1.0.3-1.el5 set to be updated ---> Package php-pear-HTML-Common.noarch 0:1.2.5-1.el5 set to be updated ---> Package php-pear-HTML-QuickForm.noarch 0:3.2.12-1.el5 set to be updated ---> Package php-pear-HTML-QuickForm-ElementGrid.noarch 0:0.1.1-1.el5 set to be updated ---> Package php-pear-HTML-QuickForm-advmultiselect.noarch 0:1.4.1-1.el5 set to be updated ---> Package php-pear-HTML-Table.noarch 0:1.7.5-1.el5 set to be updated ---> Package php-pear-HTML-Template-IT.noarch 0:1.3.0-2.el5 set to be updated ---> Package php-pear-HTML_Template_PHPLIB.noarch 0:1.4.0-2.el5 set to be update d ---> Package php-pear-HTTP.noarch 0:1.4.0-7.el5 set to be updated ---> Package php-pear-HTTP-Client.noarch 0:1.1.1-1.el5 set to be updated ---> Package php-pear-HTTP-Request.noarch 0:1.4.4-1.el5 set to be updated ---> Package php-pear-HTTP-Upload.noarch 0:0.9.1-2.el5 set to be updated ---> Package php-pear-Image-Canvas.noarch 0:0.3.1-1.el5 set to be updated ---> Package php-pear-Image-Color.noarch 0:1.0.3-1.el5 set to be updated ---> Package php-pear-Image-Graph.noarch 0:0.8.0-1.el5 set to be updated ---> Package php-pear-Image-GraphViz.noarch 0:1.2.1-4.el5 set to be updated --> Processing Dependency: graphviz for package: php-pear-Image-GraphViz ---> Package php-pear-Log.noarch 0:1.12.7-1.el5 set to be updated ---> Package php-pear-MDB2.noarch 0:2.4.1-2.el5.centos set to be updated ---> Package php-pear-MDB2-Driver-mysql.noarch 0:1.4.1-3.el5.centos set to be up dated ---> Package php-pear-MDB2-Driver-pgsql.noarch 0:1.4.1-1.el5 set to be updated ---> Package php-pear-MDB2-Schema.noarch 0:0.8.0-2.el5 set to be updated ---> Package php-pear-Mail.noarch 0:1.1.14-5.el5.1 set to be updated ---> Package php-pear-Mail-Mime.noarch 0:1.4.0-1.el5.centos set to be updated ---> Package php-pear-Math-Stats.noarch 0:0.9.0-0.1.beta3.el5 set to be updated ---> Package php-pear-Net-Curl.noarch 0:1.2.5-1.el5 set to be updated ---> Package php-pear-Net-DIME.noarch 0:1.0.1-1.el5 set to be updated ---> Package php-pear-Net-FTP.noarch 0:1.3.4-1.el5 set to be updated ---> Package php-pear-Net-POP3.noarch 0:1.3.7-1.el5 set to be updated ---> Package php-pear-Net-Ping.noarch 0:2.4.5-1.el5 set to be updated ---> Package php-pear-Net-SMTP.noarch 0:1.4.4-1.el5 set to be updated ---> Package php-pear-Net-Sieve.noarch 0:1.3.2-1.el5 set to be updated ---> Package php-pear-Net-Socket.noarch 0:1.0.10-1.el5 set to be updated ---> Package php-pear-Net-Traceroute.noarch 0:0.21.3-1.el5 set to be updated ---> Package php-pear-Net-URL.noarch 0:1.0.15-1.el5.centos set to be updated ---> Package php-pear-Net-URL-Mapper.noarch 0:0.9.0-2.el5.1 set to be updated ---> Package php-pear-Net-URL2.noarch 0:0.3.0-1.el5 set to be updated ---> Package php-pear-Net-UserAgent-Detect.noarch 0:2.5.2-1.el5 set to be update d ---> Package php-pear-Numbers-Roman.noarch 0:1.0.2-2.el5 set to be updated ---> Package php-pear-Numbers-Words.noarch 0:0.16.1-1.el5 set to be updated ---> Package php-pear-OLE.noarch 0:1.0.0-0.4.rc1.el5 set to be updated ---> Package php-pear-PHP-CodeSniffer.noarch 0:1.2.2-1.el5 set to be updated ---> Package php-pear-PHP-Compat.noarch 0:1.5.0-1.el5 set to be updated ---> Package php-pear-PHP-CompatInfo.noarch 0:1.4.3-1.el5 set to be updated ---> Package php-pear-PHPUnit.noarch 0:3.3.5-2.el5 set to be updated --> Processing Dependency: php-pecl(Xdebug) >= 2.0.0 for package: php-pear-PHPUn it --> Processing Dependency: php-channel(pear.phpunit.de) for package: php-pear-PH PUnit ---> Package php-pear-Pager.noarch 0:2.4.8-1.el5 set to be updated ---> Package php-pear-Payment-Process.noarch 0:0.6.6-1.el5 set to be updated ---> Package php-pear-Phlickr.noarch 0:0.2.7-2.el5 set to be updated ---> Package php-pear-PhpDocumentor.noarch 0:1.4.3-1.el5 set to be updated --> Processing Dependency: php-Smarty >= 2.6.0 for package: php-pear-PhpDocument or ---> Package php-pear-PhpDocumentor-docs.noarch 0:1.4.3-1.el5 set to be updated ---> Package php-pear-SOAP.noarch 0:0.11.0-2.el5 set to be updated ---> Package php-pear-Spreadsheet-Excel-Writer.noarch 0:0.9.2-2.el5 set to be up dated ---> Package php-pear-Structures-DataGrid.noarch 0:0.8.3-1.el5 set to be updated ---> Package php-pear-Structures-DataGrid-DataSource-Array.noarch 0:0.1.3-1.el5 set to be updated ---> Package php-pear-Structures-DataGrid-DataSource-DataObject.noarch 0:0.1.2-1 .el5 set to be updated ---> Package php-pear-Structures-DataGrid-DataSource-MDB2.noarch 0:0.1.10-1.el5 set to be updated ---> Package php-pear-Structures-DataGrid-DataSource-RSS.noarch 0:0.1.1-1.el5 se t to be updated ---> Package php-pear-Structures-DataGrid-Renderer-Pager.noarch 0:0.1.2-1.el5 se t to be updated ---> Package php-pear-Text-Diff.noarch 0:1.1.0-1.el5 set to be updated ---> Package php-pear-Validate.noarch 0:0.8.3-1.el5 set to be updated ---> Package php-pear-Validate-Finance-CreditCard.noarch 0:0.5.2-1.el5 set to be updated ---> Package php-pear-Var-Dump.noarch 0:1.0.3-2.el5 set to be updated ---> Package php-pear-XML-Beautifier.noarch 0:1.1-3.el5 set to be updated ---> Package php-pear-XML-Parser.noarch 0:1.2.8-1.el5 set to be updated ---> Package php-pear-XML-RSS.noarch 0:1.0.0-1.el5 set to be updated ---> Package php-pear-XML-Serializer.noarch 0:0.20.0-1.el5 set to be updated ---> Package php-pear-date.noarch 0:1.4.6-1.el5.rf set to be updated ---> Package php-pear-db.noarch 0:1.7.13-2.el5.rf set to be updated ---> Package php-pear-excel.noarch 0:0.9.0-1.el5.rf set to be updated ---> Package php-pear-file.noarch 0:1.2.2-1.el5.rf set to be updated ---> Package php-pear-log.noarch 0:1.9.3-1.el5.rf set to be updated ---> Package php-pear-mail_mime.noarch 0:1.3.1-1.el5.rf set to be updated ---> Package php-pear-ole.noarch 0:0.5-2.el5.rf set to be updated --> Running transaction check ---> Package graphviz.i386 0:2.22.0-4.el5.rf set to be updated ---> Package php-Smarty.noarch 0:2.6.26-1.el5 set to be updated ---> Package php-channel-phpunit.noarch 0:1.0-2.el5 set to be updated ---> Package php-domxml-php4-php5.noarch 0:1.21.2-1.el5 set to be updated ---> Package php-mcrypt.i386 0:5.2.9-2.el5.centos.3 set to be updated --> Processing Dependency: php-api = 20041225 for package: php-mcrypt ---> Package php-pecl-radius.i386 0:1.2.5-4.el5 set to be updated --> Processing Dependency: php-api = 20041225 for package: php-pecl-radius ---> Package php-pecl-xdebug.i386 0:2.0.5-1.el5.1 set to be updated --> Processing Dependency: php-api = 20041225 for package: php-pecl-xdebug --> Finished Dependency Resolution php-pecl-xdebug-2.0.5-1.el5.1.i386 from epel has depsolving problems --> Missing Dependency: php-api = 20041225 is needed by package php-pecl-xdebu g-2.0.5-1.el5.1.i386 (epel) php-pecl-radius-1.2.5-4.el5.i386 from epel has depsolving problems --> Missing Dependency: php-api = 20041225 is needed by package php-pecl-radiu s-1.2.5-4.el5.i386 (epel) php-mcrypt-5.2.9-2.el5.centos.3.i386 from c5-testing has depsolving problems --> Missing Dependency: php-api = 20041225 is needed by package php-mcrypt-5.2 .9-2.el5.centos.3.i386 (c5-testing) Error: Missing Dependency: php-api = 20041225 is needed by package php-pecl-radi us-1.2.5-4.el5.i386 (epel) Error: Missing Dependency: php-api = 20041225 is needed by package php-mcrypt-5. 2.9-2.el5.centos.3.i386 (c5-testing) Error: Missing Dependency: php-api = 20041225 is needed by package php-pecl-xdeb ug-2.0.5-1.el5.1.i386 (epel) You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest The program package-cleanup is found in the yum-utils package.

    Read the article

1