bredchosting.com logo 125x79
Example: mywebsite.com
RS Form - Streamline Form Submissions with RS Form Pro and Google Integration in Joomla 5

RS FORM from RS Joomla is a powerful extension form builder with many extra and underrated features. In this article, we will explore some of these features, from using Google Docs and Google Sheets to using the inbuilt .PDF solution in RS Form.

Having a form on your website gives visitors an easy way to get in touch with you, and you can streamline how the visitor gives you the information. You can download RS Form Pro from RS Joomla's website.

Install RS Form

Before you start, it is important to install the "RS Form Pro" Component and the "Plugin - Google Sheets," which you bought on RS Joomla's website.

Below is the information on how to install it in Joomla 5:

Learn how to install an Extension in Joomla 5

How to Install an extension in Joomla 5

To install extensions and activate plugins in Joomla 5, follow these steps:

  1. Download the Extension:

    • Download the extension (plugin, module, or component) to your local machine as a .zip file package.
  2. Access the Joomla Backend:

    • Log into your Joomla Dashboard (Administrator).
  3. Install the Extension:

    • From the Backend, select ExtensionsInstall/Uninstall.
    • Click the Browse button and select the extension package on your local machine.
    • Click the Upload File & Install button.
  4. Enable the Plugin:

    • After installation, go to ExtensionsPlug-In Manager.
    • Use the Filter feature to find your plugin, and then click on the plugin in the list below.
    • On the Plug-in Manager page, set Status to Enabled, configure any other settings available with the plugin, and then click Save & Close.

Here is a detailed guide from the Joomla documentation:

  • Installing an Extension:

    • Download the extension to your local machine as a .zip file package.
    • From the Backend of your Joomla site (Administrator), select ExtensionsInstall/Uninstall.
    • Click the Browse button and select the extension package on your local machine.
    • Click the Upload File & Install button.
  • Enabling a Plugin:

    • Go to ExtensionsPlug-In Manager.
    • Use the Filter feature to find your plugin, and then click on the plugin in the list below.
    • On the Plug-in Manager page, set Status to Enabled, configure any other settings available with the plugin, and then click Save & Close.

By following these steps, you should be able to install and activate extensions and plugins in Joomla 5.

The use of Google Docs and Google Sheets to gather the information from RS Form submissions

It is quite easy to gather submissions from RS Form using a Google Sheet, you must have an Google Workspace account, and the RS Form plugin Plugin - Google Sheets. The plugin can also reduce the risk of generating spam since you may eliminate admin emails.

01. Connecting to Google Sheets

  • Login to Google Develop Console
  • If you don't have any project before, click the "Create" button on top. If you have used it before, click the dropdown box to the left of the search bar.

google dev console credential add

  • In the dashboard search for "Google Sheets API"
  • If API not enabled, click "Enable API and Services"
  • On the left side, click "Credentials"
  • Click on "Configure Concent Screen"
  • Enter the APP information and click "Save and Continue"
  • Now you need to create the Credentials, click on "Create Credentials" and select the "OAuth client ID"
  • Select "Web Application" and add a name.
  • Within the "Authorized JavaScript orgins" add your website url, like https://www.website.com. If you are using localhost, you can leave it blank

rsjoomla rsform config google sheet api

  • Within the RS Form Configuration, on Joomla Administrator go to Components > RSForm Pro > Configuration > Google Sheets and copy the "Redirect URI" into the "Authorized redirect URIs".

google dev console create oauth client

  • Click "Create", and the API keys will be created.
  • Within the RS Form Configuration, on Joomla Administrator go to Components > RSForm Pro > Configuration > Google Sheets, locate the "Google Client ID", and the "Google Secret" and add the values from the API keys

 

Ads from Bredc.com!

Form Building

Joomla Forms - We build the forms for you

Form building, which can often feel like a daunting nightmare, is easy with Joomla and its extensions like RS Form. Fill out this form, and we will send you a proposal for a standout form!

Form Building with RS Form

 

google dev console created oauth client

  • Click the big green button "Authorize", and authorize with the Google Account
  • CON GRATULATION, You have connected the RS Form to Google

02. Create the Form in RS Form

Creating a form in RSForm Pro for Joomla involves several steps. Here's a step-by-step guide to help you get started:

  1. Install and Activate RSForm Pro:

    • Ensure you have RSForm Pro installed and activated on your Joomla site. If not, download and install it from the RSJoomla website.
    • Go to your Joomla backend, navigate to Extensions > Manage, and ensure RSForm Pro is listed and enabled.
  2. Create a New Form:

    • Log in to your Joomla backend.
    • Navigate to Components > RSForm Pro.
    • Click on the Forms tab.
    • Click the New button to create a new form.
  3. Form Settings:

    • Form Name: Enter a name for your form (e.g., "Contact Form").
    • Form Description: Optionally, add a brief description of the form.
    • Form Layout: Choose a layout for your form (e.g., "Single Column").
    • Form Theme: Select a theme for your form (e.g., "Default").
    • Click Save to save the form settings.
  4. Add Form Fields:

    • Click on the Fields tab.
    • Click the New button to add a new field.
    • Field Type: Choose the type of field you want to add (e.g., "Text", "Email", "Checkbox", etc.).
    • Field Label: Enter a label for the field (e.g., "Name").
    • Field Name: Enter a unique name for the field (e.g., "name").
    • Field Size: Optionally, set the size of the field.
    • Required: Check the box if the field is required.
    • Click Save to save the field.
  5. Add Multiple Fields:

    • Repeat step 4 to add more fields to your form. For example, you might add fields for email, phone number, and message.
  6. Form Actions:

    • Click on the Actions tab.
    • Click the New button to add a new action.
    • Action Type: Choose the type of action (e.g., "Send Email").
    • Action Settings: Configure the action settings. For example, if you chose "Send Email", you'll need to set the recipient email address, subject, and email body.
    • Click Save to save the action.
  7. Publish the Form:

    • Click on the Publish tab.
    • Form Status: Set the form status to Published.
    • Form Access: Choose the access level for the form (e.g., Public).
    • Click Save to save the publish settings.
  8. Add the Form to a Page:

    • Create a new article or edit an existing one where you want to display the form.
    • Click the RSForm Pro button in the editor toolbar.
    • Select the form you created from the list.
    • Click Insert to insert the form into the article.
  9. Save and Preview:

    • Save the article.
    • Preview the article to see the form in action.

That's it You've successfully created and published a form using RSForm Pro in Joomla.

 

03. Create a Google Spreadsheet

Go to Google Spreadsheet and create a spreadsheet, add the headings that you want to extract from the RS Form submission, in row 1.

04. Connect your fields to the Google Sheet

Now we have added the RS Form to Google Developer Console, now we need to add the form to the actual Sheet.

Select the form you want to use, from the Joomla Administrator go to Components > RSForm Pro > Manage Forms, and click

rsjoomla rsform form propartiesbutton

  • On the left, select "Google Sheets"

rsjoomla rsform add form to spreadsheet

  1. First you need to activate the Form for sending to Google Sheets, toggle "Use Google Sheets" to On, and save the Form.
  2. Find your Google Spreadsheet ID
  3. Select your "Sheet Name" from the dropdown field
  4. Here you assign the different fields to your Google Sheet Headers witch you created earlier.

Combine your Google Sheet to generate Documents from your submissions in the RS Form

Create a folder within your Google Drive and create a Document template, like this: https://docs.google.com/document/d/1ZHIFSi65k8a3yLuVUHZ58GR4iJ-FZgK0A1CM0MXDl7U/edit?usp=sharing

Let us start creating the script for the Google Sheet

Now we are going to use "App Script to generate a document from the submissions done in the form

First we must create a menu item for generating the "Contact Submission" document from the template.


	function onOpen() {
		//First we create a Menu for the script to run
		const ui = SpreadsheetApp.getUi();
		const menu = ui.createMenu("AutoFill Docs");
		menu.addItem("Create New Contact Submission", "createNewGoogleDocs");
		menu.addToUi();
	}

Now we get the template document by its id.


	function createNewGoogleDocs() {
		//This value should be the id of your document template that we created in the last step
		const googleDocTemplate = DriveApp.getFileById(
			"1ZHIFSi65k8a3yLuVUHZ58GR4iJ-FZgK0A1CM0MXDl7U"
		);

Here we set the id of the folder where we want to store the finished "Contact Submission" for each submission.


	//This value should be the id of the folder where you want your completed documents stored
	const destinationFolder = DriveApp.getFolderById(
		"1C9IID4DfjKt8udItBJeve524gSEZtgDv"
	);

Now we use the sheet name, and store it as a variable


	//Here we store the sheet as a variable
	const sheet =
		SpreadsheetApp.getActiveSpreadsheet().getSheetByName("RSForm Tutorial");

This gets all values in an 2D array


	//Now we get all of the values as a 2D array
	const rows = sheet.getDataRange().getValues();

Now we need to start processing each spreadsheet row

We check if the spreadsheet contains headers

We use column 7 as a guide for showing that this row has already been processed, and we will create a document link in this column


	//Start processing each spreadsheet row
	rows.forEach(function (row, index) {
		//Here we check if this row is the headers, if so we skip it
		if (index === 0) return;
		//Here we check if a document has already been generated by looking at 'Document Link', if so we skip it
		if (row[7]) return;

Now we need to create a new document from the template, and store it under a new name in our destination folder.


	//Using the row data in a template literal, we make a copy of our template document in our destinationFolder
		const copy = googleDocTemplate.makeCopy(
			`Contact Submission, ${row[0]}`,
			destinationFolder
		);	

Now we are ready to use the tags as we created in the document template


	//Once we have the copy, we then open it using the DocumentApp
		const doc = DocumentApp.openById(copy.getId());
		//All of the content lives in the body, so we get that for editing
		const body = doc.getBody();	

We sanitize the date for correct display, and store it in a variable


	//In this line we do some friendly date formatting, that may or may not work for you locale
		const friendlyDate = new Date(row[1]).toLocaleDateString();

Now we write all the tags, corresponding to the row number of our spreadsheet


	//In these lines, we replace our replacement tokens with values from our spreadsheet row
	body.replaceText("{{ID}}", row[0]);
	body.replaceText("{{DATE}}", friendlyDate);
	body.replaceText("{{NAME}}", row[2]);
	body.replaceText("{{EMAIL}}", row[3]);
	body.replaceText("{{SUBJECT}}", row[3]);
	body.replaceText("{{MESSAGE}}", row[3]);	

We save and closes the document.


	//We make our changes permanent by saving and closing the document
		doc.saveAndClose();	

We store the URL to the document in a variable, and output it in the spreadsheet


	//Store the url of our new document in a variable
		const url = doc.getUrl();
		//Write that value back to the 'Document Link' column in the spreadsheet.
		sheet.getRange(index + 1, 7).setValue(url);

We close the script


	});
}	

Saving and authorizing the use of the APP Script

It is now time to save the APP Script and deploy our Application, at the top CLICK THE "Save"-icon

google sheets appscript save

You will get an box for authorizing the script to be rum, like this:

google sheets appscript authorize required

Grant authorizing, by clicking on "Allow" on the next screen

google sheets appscript authorize required review

Go back to your spreadsheet and refresh the page, now the menu "AutoFill Docs" on top will appear, and in it the menu "Create New Contact Submission" for creating the document.

Click this menu

Now Go to your folder where the "Submissions" where to be stored, you will then see the new document. Here is the result of one submission https://docs.google.com/document/d/1VAPH5pRqkyoPOXWpf6Z0UGg7WexQ-TcM4NNYTxS207s/edit.

Remember to TEST your Form before deployment!

Comments wanted

- LET ME KNOW IF YOU KNOW ANY OTHER WAYS TO DO THIS IN THE COMMENTS BELOW -

One comment

Leave your comment

In reply to Some User
  • The Joomla Content Editor (JCE) is a powerful extension designed to simplify and enhance content creation within the Joomla content management system. Joomla’s default editor options can be limiting, especially for users who need more control over formatting, multimedia management, and layout...

  • Joomla is a widely-used, open-source content management system (CMS) recognized globally for its flexibility, scalability, and ease of use. It powers millions of websites ranging from personal blogs to large-scale corporate portals and government websites. Joomla provides a robust framework that...

  • one name consistently stands out when discussing Joomla website backups: Akeeba Backup. Developed by Akeeba Ltd.. Whether you are managing a personal blog or a commercial enterprise website, safeguarding your data is paramount, and Akeeba Backup rises to this challenge with robust features,...

  • Creating a form using RS Form in Joomla 5 is a straightforward process.

    Follow the steps below to create your form easily:

    Step 1: Install RS Form

    1. Log in to your Joomla 5 administrator panel.
    2. Navigate to Extensions > Manage > Install.
    3. Upload the RS Form package file and click on Install.

    Step 2:...

  • Discover the truth behind Joomla!, the renowned content management system empowering countless websites globally. Unraveling prevalent misconceptions, this article delves into Joomla! 's functionality and user-friendliness to offer valuable insights. By debunking the top ten myths surrounding...

  • The Failed Login Attempts plugin gives you an overview of your failed logins, but you can make it even better by applying a simple override. The override provides a link to more information about who has tried to log in, and you can therefore use other extensions to block the user or take...

  • You’ve probably heard that Joomla is a “free” platform. That’s true, but it doesn’t tell the whole story. You can download the software for free, and you can host Joomla sites for free on specific hosting platforms. However, if you want the best possible performance and security, you’ll need to...

  • Subform fields are mighty, but did you know they look like a list? - Here, I will show you how you can spice up the look of your Subform.


    Although Subforms are not a new feature in Joomla 4 but were available already in Joomla 3, in Joomla 3, they were introduced as "Repeatable-Fields". But...

  •  In Joomla, it is relatively easy to create CSS overrides. If you would like to change the color of the Invalidate Cache button, you can read on.


    How to create a CSS override in Joomla 4 Administrator (Atum - Template)?

    Joomla is built with the intention of user customization of how it looks. CSS...

  • In Joomla 4, we were introduced to “subforms”, which are great for creating more user-friendly fields for your articles or page, containing the fields in the subform.


    The problem is that when you create a subform, the fields in the subform are divided by a comma. This doesn’t look good on your...

  • With the ability to use extensions in Joomla, it is often prevalent to install more extensions than necessary; this will usually result in a slower site. So here are my recommendations for the ten best Joomla extensions every Joomla site should have.in 2023.

  • The backend of Joomla can be very boring to look at. You can customize it as you like, by adding and replacing modules on the page.


    When you install the Joomla 3.x out off the box, you get two backend templates preinstalled, the main and mostly used template is Isis, this will be used in this...

  • JCE Editor is the best and most used Editor in Joomla; only TinyMCE as the core editor can beat it. Every Joomla site should have the JCE Editor installed because it is free and easy to use.

  • Having a good web hosting solution for your sites, either it is static or based on a CMS like Joomla, WordPress, or others, you have a lot of considerations to take into a factor. I will try in this article to guide you in the right direction towards modern hosting in 2022.

  • When you have a new Joomla Installation, the most annoying thing is that it doesn’t work as you would prefer. You may end up spending hours after hours trying to find the fault but end up banging your head in the wall. Here are 3 common reasons why your site Joomla site isn’æt working.

  • Is it possible to do things in Joomla Backend that is considered a hack! This tip from Basic Joomla is the answer, Yes!, there are several hidden possibilities in Joomla if you put your fingers into it.? - Here is how to use a hack for doing better Menu separator in Joomla. Here are two ways to do...

  • The dark mode is the new Black, and it keeps your eyes from getting light exhausting. And it also looks great in the browser. The Dark mode is not native in either Joomla 3 or Joomla 4 (as of my knowledge). But there is a solution if you don’t want to use a plugin for your browser. You can simply...

  • One of the most common mistakes when creating a new Joomla site is not securing the Joomla-site both with Backup and Security Extensions. Having up-to-date security is essential for every site on the Internet, whether it’s a plain HTML site or a complex CMS system like Joomla or WordPress offers. But...

  • There are many Extensions for Joomla, both free and with a paid license. But there are a few that should be mandatory for every installation of Joomla. I will here make a list of those I think is essential when you start a website.

  • In Joomla, it’s possible to use CSS more effectively than most people realize. You can, if wanted personalize each page just by adding a CSS class to the menu link.


    Joomla offers in most modern templates the ability to target either the title or the page’s alias. It makes customized CSS very easy,...

  • Let's state it once and for all, the backend in Joomla is quite boring, but what if you can give it a more interactive and interesting look. This is quite easy to do using the backend modules and CSS. 


    The reason for this article offsprings from a Youtube Video that shows the benefits of haveing an...

  • Is it possible to make content sliders using pure CSS & HTML only? - Read through and find out more. I will show you some smart tricks that make an awesome reusable slider using only HTMl & CSS.


    Have you ever written a long article with mutch specifications inside? - These articles have their way to become...

  • <

    CSS has from the age of the Internet been a part of doing websites. It is an easy but useful way to design an article. There are several ways to write CSS in Joomla, you can use an external file to store all CSS codes in, you can use an extension to include the code, or you can write CSS directly in the content. In this article, I will give some look into how I do it.


    In this article, I will show you three different ways to use CSS in an article. The easiest thing is to use an extension to add CSS to the article. There are several extensions in the JED (Joomla Extensions Directory) that gives this opportunity. One of the popular is Sourcerer from Regular Labs. But its also possible to do in-line CSS coding in every article, but this can be very ineffective in large articles, the third and maybe most used is to put the CSS codes into the template as eighter an external file or in the CSS capabilities of the template itself. In modern template-Framework is this common, the disadvantage of this is that you always need access to the backend to add extra CSS in your site.

    W3C CSS verifiedW3C CSS verified: W3c.org is setting the standards for CSS

    1 Code directly as you go (Hard coding the articles)

    If you prefer to do the CSS coding inline as you write an article, you must bear in mind that you will NOT be able to reuse the CSS on any other articles and you must repeat the same thing for every content with the same code. This could look like this:

    <a href="/home" style="background-color:#ff0000;color:#ffffff;">Home</a>

    This will output: Home

    2. Use an external file

    If you use an external file as a CSS source, it is normally located under the css folder in your template directory. And its usually called custom.css or user.css, the downside with this is that you need access to either FTP or bee logged in to the backend as a Super Administrator.

    3 Use an extension to add CSS code in the article

     If you want to use an extension to insert CSS in an article, you can not reuse the CSS codes without having it in every article that contains the same style.

    What do I recommend?

    A combination of the option 2 and 3, will give the easiest result and you can standardize some of the CSS styles in a file and add styles in that applies to certain articles at one addon at the end of the written article.

    Comments wanted

    - LET ME KNOW IF YOU KNOW ANY OTHER WAYS TO DO THIS IN THE COMMENTS BELOW -

  • Have you ever made a website with Joomla and you are getting the title "Home" with a large h1-header-tag? You can either hide the tag completely on all content, or you must specify it to be hidden on every page/article you make. There is a third and maybe smarter way to do this. 


    Joomla Menu options

    When you add a...

  • Have you ever been frustrated by styling a page for then realize that every image contains a white line underneath, I saw this trick on Youtube and tried it with Joomla. The result was that line disappeared. This issue resides from the early internet when we've to use inline images in the text.


    IN...

  • When you are about to change passwords in other ways that it's intended to do, you should always take in mind that it always is a security risk. You should therefore use extra care when you need to use these steps. These ways work in Joomla 2.5, 3.x, and 4.x. The tutorial is based on Joomla Docs.

  • A template is the holy grail of a CMS-system; it lays out the structure of your website. But it's always possible to tweak the content and make it look better. All Modules, Components, or Plugins in Joomla can be changed using overrides.


    Though many sites may look good with the Core template or a...

  • One of the most important things to have in mind when you deploy a new website is Backup policy. Akeeba Backup is a free Component from AkeebaBackup, which allows you to do secure backups and maintaining them for your Joomla site.

nordvpn