Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Problem with required feed url fields in feeds importer

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 282
    Comment on it

    Feeds module provides functionality to import contents from feed urls. We can setup feeds module according to:

    https://drupal.org/documentation/modules/feeds

    There are 2 ways to import feeds

    1: attach to any content type

    2: Use a standalone form to import feeds

    (in basic setting).

    If we are using standalone form then we can not set default values for node so we have to select option 1. Which provide us to select default value for node. But this approach will add a new feel URL field to node form and it is required field. So each time if a user will manually add that content then he needs to add feed url as well.

    We can remove required validation from this field as following:

    1: Open FeedsHTTPFetcher file under plugin folder. 2: Remove required validatin from sourceForm($source_config) funciton 3: Now required condition is removed but validation is still there. So we have to remove validation as well. 4: Under sourceFormValidate(&$values) funciton, put whole condition within:

    if ($values['source'] != null) {
    }
    

    For full description and other options, please follow this link:

    https://drupal.org/node/856316

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: