Results 1 to 2 of 2

Thread: Data Validation + Javascript + DetailView + Redirect

  1. #1
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Data Validation + Javascript + DetailView + Redirect

    Hi,

    In a custom view.detail.ie I am comparing a Start and End Date. If the End date occurs before the Start date I am showing a Javascript popup - I then want to redirect the user back to the Edit View of the record to fix the issue. How do I issue the header(......) inside the Javascript or is this type of data validation better to do in the edit view?

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  2. #2
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Data Validation + Javascript + DetailView + Redirect

    I had a look through the forums and I found 'validation' in the vardefs

    I tried to add the following into the vardefs.php of my custom module

    'validation'=>array('type'=>'isafter','compareto'= >'fdc_date_online_one','blank'=>true),

    Didn't seem to work. But using isbefore is working?

    Is this a bug that the isafter is not working?

    Rgds
    Chris
    Last edited by chrislynch8; 2010-04-28 at 04:07 PM.
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. custom JavaScript validation
    By waverider in forum Developer Help
    Replies: 2
    Last Post: 2010-05-01, 09:35 PM
  2. Javascript validation
    By ishaan in forum Developer Help
    Replies: 4
    Last Post: 2009-05-20, 07:21 AM
  3. Replies: 4
    Last Post: 2009-04-04, 04:59 AM
  4. Custom javascript validation
    By aswath28 in forum Developer Help
    Replies: 10
    Last Post: 2008-12-16, 09:10 AM
  5. Redirect to DetailView after Subpanel Create?
    By eggsurplus in forum Developer Help
    Replies: 4
    Last Post: 2008-07-06, 10:58 PM

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
  •