Posts

Showing posts from December, 2023

Gatsby url to call into different page apart from GAtsby-config

By default, environment variables are only available in Node.js code and are not available in the browser as some variables should be kept secret and not exposed to anyone visiting the site. To expose a variable in the browser, you must preface its name with  GATSBY_ . So  GATSBY_API_URL  will be available in browser code but  API_KEY  will not. Make sure you have the necessary dependencies installed. You may need to install packages related to environment variables and Gatsby. bash Copy code npm install dotenv If you haven't installed Gatsby CLI globally, you can do so with: bash Copy code npm install -g gatsby-cli Configure Environment Variables: Create a .env file in your Gatsby project's root directory and define your environment variables: dotenv Copy code DRUPAL_ENDPOINT=https://example.com/api/${DRUPAL_API_VERSION} DRUPAL_API_VERSION=v1 Modify gatsby-config.js : Update your gatsby-config.js file to include the code snippet you provided. Additionally, ...

How to enable Webform REST

Image
 To enable you must enable Webform module , rest ui, webform REST  you must enable the below in the extended module   if you follow all the documentation in the webform REST you will surely post into the webform using postman in the webform REST module you must enable  Enable REST resource "Webform Submit" Enable REST resource "Webform Elements" Enable REST resource "Webform Submission" There may be 2 Webform Submission resources. The one provided by this module has the path:  / webform_rest / { webform_id } / submission / { sid } Submit Webform POST / webform_rest / submit ?_format=json Example POST data: { "webform_id" : "my_webform" , "checkboxes_field" : [ "Option 3" , "Option 5" ] , "integer_field" : 3 , "radio_field" : "Mail" , "email" : "myemail@mydomain.com.au" } Enable in permission in drupal enable the Access ...