Results 1 to 6 of 6

Thread: Date field in webform drupal 6

  1. #1
    Join Date
    Sep 2010
    Posts
    12

    Date field in webform drupal 6

    This time with a little problem of validation, I have a form done in webform I have two date fields, Salla date and return date. In both schedule I'm using the jquery UI. What I need to validate, it does not happen is the following:
    Departure Date: 06/12/2010
    Return date: 01/11/2009
    will be possible to validate these two fields webform?? I have tried many different ways but not getting an appropriate output. So thought that someone from your side will help me. Many thanks to everyone for the collaboration they had with me.

  2. #2
    Join Date
    Nov 2008
    Posts
    88

    Re: Date field in webform drupal 6

    What kind of field you are using date or textfield? I would like to suggest you to validate fields in particular, makes no comparison to where. What you can do is validate with javascript. Will be easier because if they touch you validate the code fields. According to me many users wants to validate two date fields, comparing the second date is not less or equal to the first. I say do it with javascript I personally will be better because it could validate onsite and not wait to send the data processing and return. If it is extremely necessary to validate whether they would use the hooks.

  3. #3
    Join Date
    Nov 2008
    Posts
    52

    Re: Date field in webform drupal 6

    To perform validation with the module you just mentioned T0tal L0$$, must be created manually using hook_webform_validation_validators hooks () and hook_webform_validation_validate (). That is what you need to validate? because that depends what you have to do. Maybe I recommend you use those hooks are not difficult to use and you everything is much more professional. Hope that you will get some hint from this.

  4. #4
    Join Date
    Apr 2009
    Posts
    97

    Re: Date field in webform drupal 6

    Is that there is no "if extremely necessary" when validating data. I do not share what you mention, unless it is an extremely cumbersome application, the data always have to validate both the client side (with javascript) and server side (with php, in this case, Drupal). I come from a browser, disable JavaScript, and validation raped. For this solution I meant "more professional" if a development for a company, at no time did not occur to me to validate the server side.

  5. #5
    Join Date
    Sep 2010
    Posts
    12

    Re: Date field in webform drupal 6

    I already I have the webform module validation of me not to validate the date type fields. On the other hand reading some comments, I got into the webform date.inc page and there I could set the default validation that must take the current system date with php, it is not possible departure dates and be back before the current day. What I would be missing at this point is to send the user an error message with validation above, and also the comparison between the dates of departure and return. I think the hook webform can add these validations, not if I use the cid of the component to do these validations. Anything you find post again if you have any idea is welcome. Again, thank you very much for all your comments.

  6. #6
    Join Date
    Apr 2008
    Posts
    264

    Re: Date field in webform drupal 6

    Remember that it is a recommended practice modules hack, because if an upgrade comes out of it, you can get to override everything, and lose all the programming you've added! If you did so, you would have to see how does the error handling module in the other cases, certain that if the condition is not met, call the function form_set_error, and passes the error message. Anyway, now that I think about it, you do not need webform_validation not even use the module, if you got the hook that intercepts the time of validation data, then only one condition you have to do and ask if the dates meet your validation or not, and if not send the form_set_error and go. The module webform_validation, now I see, has a hook that you can really help in validating, you do not need to make any new validation. Just do the checking.

Similar Threads

  1. Replies: 1
    Last Post: 22-05-2011, 05:07 AM
  2. Need to append a sequential number to a date field in access
    By $Jaganmohini$ in forum Windows Software
    Replies: 4
    Last Post: 04-02-2011, 07:39 PM
  3. Date field in HTML form
    By Messenger in forum Software Development
    Replies: 6
    Last Post: 29-07-2010, 10:30 AM
  4. Multi Field value field in Microsoft Access
    By Erubiel in forum Windows Software
    Replies: 3
    Last Post: 20-11-2009, 12:55 AM
  5. Webform Filler
    By DACIAN in forum Technology & Internet
    Replies: 1
    Last Post: 25-10-2008, 01:22 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,171,278.47491 seconds with 17 queries