Category: Blog

Best mobile app development and design company. Best e-commerce development company.
  • Creation and Remove custom form fields using ajax in Drupal 8

    Creation and Remove custom form fields using ajax in Drupal 8

    Below given is the code for the creation and removal of the custom form field using Ajax in Drupal 8. public function buildForm(array $form, FormStateInterface $form_state) { $form[‘#tree’] = true; $form[‘#prefix’] = ‘ ‘; $form[‘#suffix’] = ”; $form[‘#cache’] = [‘max-age’ => 0]; $nb_sponsee = $form_state->get(‘nb_sponsee’); $form[‘sponsees’] = [ ‘#type’ => ‘container’, ‘#prefix’ => ‘ ‘,…

  • Code For PHP File For Saving The Graph As An Image Inside Your Folder

    Code For PHP File For Saving The Graph As An Image Inside Your Folder

    Given below is the PHP code for saving a graph as an image inside the folder. At Sreyas, experienced PHP developers are available for customizing the requirements of clients. This script captures image data from a POST request, processes it, and saves it as a PNG file in a specified directory. php $img_data = $_POST[‘data’];…

  • Stripe Integration In Drupal 8

    Stripe Integration In Drupal 8

    Stripe is a commonly used payment gateway. Stripe integration in Drupal 8 requires a stripe library. We can install the stripe library using Composer. Use the following command to install the stripe library using which Stripe integration in Drupal 8 is possible. public function buildForm(array $form, FormStateInterface $form_state) { $stripe=array(“secret_key”=> “********************”, //Give your api keys…

  • Programmatically login a user in Drupal 7

    Programmatically login a user in Drupal 7

    There are scenarios where you may need to programmatically log in a user in your Drupal site, such as during a custom registration process, single sign-on implementations, or for testing purposes. Below is the to programmatically log a user in Drupal 7. //Auto login new user $account = user_load($uid);// $uid is the user id $user_account…

  • C tools Modal Popup and Theming in Drupal 7

    C tools Modal Popup and Theming in Drupal 7

    Using the power of the Ctools Modal Popup and Theming in Drupal 7 we can create our own custom popups. Theming of popups can be done with the help of a js file, which we can alter accordingly. Here is an example of how to use Ctools to create a popup up to Update Profile…

  • BOOST YOUR BUSINESS THROUGH SOCIAL MEDIA!!!!

    BOOST YOUR BUSINESS THROUGH SOCIAL MEDIA!!!!

    Some fast tips on a way to create the foremost of your Social Media Optimization(SMO)efforts. 1. Integrate Social icons into your website Social sharing icons ought to be integrated into your website design. embrace direct web links to your social media channels from your websiteand from your social profiles back to your website. you’ll be able…

  • WordPress Website Performance Optimization

    WordPress Website Performance Optimization

    These days almost every business person has a website, there are many ways to make the websites attractive, content-rich, and responsive so that websites can be seen on different devices without any problem. There are many perfectly structured templates that anyone can make use of to get an attractive website. But after all their changes…

  • How to add external/internal files to the Drupal 8 theme

    How to add external/internal files to the Drupal 8 theme

    This page explains how to add an external/internal style sheet or javascript file into the Drupal 8 theme. Use the below code in THEME_NAME.libraries.yml global-styling: css: theme: css/style.css: {} ‘https://fonts.googleapis.com/css?family=Fira+Sans:300,400,500,700’: { type: external } # lib: # lib/mulihu-scrollbar/jquery.mCustomScrollbar.css: {} version: VERSION js: js/owl.carousel.min.js: {} # lib/mulihu-scrollbar/jquery.mCustomScrollbar.concat.min.js: {} dependencies: – core/jquery – core/drupal

  • How to render block in Drupal 8 theme template.

    How to render block in Drupal 8 theme template.

    Drupal is content management software and websites and applications developed using Drupal have easy content authoring, reliable performance, and excellent security. To render block in a Drupal 8 theme template, allows a theme to have nearly complete control over the appearance of the site, which includes both the markup and the CSS used to style…