Let Discuss's Profile

52
Points

Questions
12

Answers
102

  • Asked on April 5, 2018 in drupal.

    Full code

    function themename_form_alter(&$form, &$form_state, $form_id) {
    
     switch ($form_id){
    
     case "webform_client_form_50":
    
     $form['actions']['#attributes']['class'][] = 'd-inline-block';
    
     $form['submitted']['email']['#theme_wrappers'] = array(); // this is for remove wrapper div for form fields 
    
     break; 
    
     }
    
    }
    
    
    • 72 views
    • 2 answers
    • 0 votes
  • Asked on April 5, 2018 in drupal.

    Try this one 

    Step 1

    function themename_form_alter(&$form, &$form_state, $form_id) {
    }
    
    

    Change themename with your theme name 

    Step 2

    switch ($form_id){
    }
    
    

     

    Step 3

    case "webform_client_form_50":
    $form['actions']['#attributes']['class'][] = 'd-inline-block';
    $form['submitted']['email']['#theme_wrappers'] = array(); // this is for remove wrapper div for form fields 
    break;
    
    

     

    webform_client_form_50 change with your form id

    • 72 views
    • 2 answers
    • 0 votes
  • Asked on April 5, 2018 in Angular 5.

    Angular is a most popular web development framework for developing mobile apps as well as desktop applications.

    Angular framework is also utilized in the cross platform mobile development called IONIC and so it is not limited to web apps only.

    Angular is an open source framework written and maintained by angular team at Google and the Father of Angular is Misko Hevery.

    Misko Hevery – Agile Coach at Google, Attended Santa Clara University and Lives in Saratoga, CA.

    • Stayed Informed – Angular 2 vs. Angular 1 | Angular 4 vs. Angular 2 | Angular 5 vs. Angular 4 |
      Angular 6 vs Angular 5

    Angular is written in TypeScript and so it comes with all the capabilities that typescript offers.
    You don’t worry about the TypeScript versions. The compiler manages to the versioning related problems and Angular team working with Traceur compiler team to provide the support to build some extensions.

    Keep and try to upgrading Angular, the Angular’s community has announced Angular releases in every 6 months and its looks like –

    1. Angular 5 is in Oct 2017
    2. Angular 6 is in Mar 2018 and
    3. Angular 7 is in Oct 2018
    4. And so on

    What Is Angular Prerequisites?

    Before you can install Angular 4 or 5, you must need to have some prerequisites.

    1. You must to have Node.js installed.
    2. You must to have NPM (Node Package Manager) installed.

     

    • 79 views
    • 1 answers
    • 0 votes
  • Asked on November 30, 2017 in Firebase.

    WordPress requires PHP to run on the server and Firebase Hosting can’t run server-side code (no PHP) but only static content (html, images, js, etc). So the answer is, you can’t install WordPress in the Firebase Hosting.

    • 154 views
    • 1 answers
    • 0 votes
    • 164 views
    • 1 answers
    • 0 votes
    • 134 views
    • 1 answers
    • 0 votes
  • Asked on August 4, 2017 in json.

    All current browsers have native JSON support built in. So as long as you’re not dealing with prehistoric browsers like IE6/7 you can do it just as easily as that:

    var j={"name":"binchen"};
    
    JSON.stringify(j); // '{"name":"binchen"}'
    
    
    • 151 views
    • 1 answers
    • 0 votes
  • Asked on August 4, 2017 in C++.

    Use the StringFromCLSID function to convert it to a string

    Example

    GUID guid;
    
    CoCreateGuid(&guid);
    OLECHAR* guidString;
    
    StringFromCLSID(guid, &guidString);
    // use guidString...
    // ensure memory is freed
    
    ::CoTaskMemFree(guidString);
    

    Also see the MSDN definition of a GUID for a description of data4, which is an array containing the last 8 bytes of the GUID

     

    • 141 views
    • 1 answers
    • 0 votes
  • Asked on August 4, 2017 in jQuery.

    Use the below code

    var value = jQuery('.classname').attr('data-target');
    
    

     

    In the above example .classname, class name of required element

    data-target is attribute

    This answer accepted by Sha. on August 4, 2017 Earned 15 points.

    • 90 views
    • 1 answers
    • 0 votes
  • Asked on July 19, 2017 in drupal.

    Try below code

    function theme_checkbox($variables) {
    
    $element = $variables['element'];
    
    $element['#attributes']['type'] = 'checkbox';
    
    element_set_attributes($element, array('id', 'name', '#return_value' => 'value'));
    // Unchecked checkbox has #value of integer 0.
    
    if (!empty($element['#checked'])) {
    
    $element['#attributes']['checked'] = 'checked';
    
    }
    
    _form_set_class($element, array('form-checkbox'));
    return '<input' . drupal_attributes($element['#attributes']) . ' />';
    
    }
    
    • 110 views
    • 1 answers
    • 0 votes