Tassos Marinos Developer of Joomla Extensions

Using the Content App

Published in Convert Forms
Updated 10 Jul, 2023

Do you want to accept user-submitted Joomla articles? Are you looking for a way to create Joomla articles automatically when a user submits a form?

You can effortlessly create custom article submission forms to gather specific information from your users. Whether you need to collect blog posts, news articles, or any other type of content, Convert Forms Content App makes the process quick and easy.

This guide will show you how to allow users to submit articles to your Joomla site without writing a single line of code. That way, you can quickly publish them on the front end. This is super easy to set up, and you can allow posts from registered or guest users.

TABLE OF CONTENTS

Requirements

To use the Content App, you will need the following:

  • Convert Forms Pro 4.2+
  • The Convert Forms - Apps - Content plugin installed and activated.

Supported Actions

The Content app supports the following actions:

  1. Create Article: Use this to create a new Joomla article

We plan to support the following actions in a future release:

  1. Update Article: Update an existing article.
  2. Create Category: Create a new content category

Using the Create Article Action

You’ll need to create a new form or edit an existing one to start. After opening the form builder, go to the Tasks panel and click Create Your First Task. This starts the process of creating a new task.

Upon opening the pop-up dialog, you will see a list of apps. Search for the Content app. Your screen should look like this:

content app

Next, we must choose the proper trigger to fire the task at the right time.

  • Select New Submission in the Trigger option.
  • Select Create Article in the Action option.

Your screen should look like this:

content action trigger

In the next screen, you will see all available settings to configure the action. We’ve outlined what each of these does below.

content task setup

Title

The title of the article.

Note the article’s alias is automatically generated based on the article’s title during submission. If the generated alias already exists, it will get an increment trailing number at the end, separated by a dash.

Text

The actual text of the article.

Note: Due to technical reasons, this option is the only option on the screen that does not have a dropdown selection to map it to a form field easily. This does not mean the option does not accept Smart Tags. To map it to a field, you can still use the {field.FIELDNAME} Smart Tag.

Category

The ID of the category that will be associated with the article. This option lists all the published categories for your convenience. If you map this option with a Smart Tag, ensure it returns a valid category ID.

Author

The ID of the user account will represent the article's author. Select the Detect Logged-in User option to assign the logged-in user that submits the form as the article’s author. The article will have no author if a non-logged-in user submits the form. To allow only logged-in users to access the form, either publish the form using a Form Menu Type and set the proper access level or use PHP. If you map this option with a Smart Tag, ensure it returns a valid user ID.

Status

The status of the article. This option lists all the supported statuses for your convenience. If you map this option with a Smart Tag, ensure it returns one of the following status codes: Published = 1, Unpublished = 0, Trashed = -1, Archived = 2.

Tags

Assign one or more tags to the article. Either select tags from the list or type your own. If you want to assign an existing tag with a Smart Tag, ensure it returns a valid Tag ID. A new tag will be created and assigned if the Smart Tag returns text or an unrecognized Tag ID.

If the form is expected to create tags, the proper permissions must be given in the Tags component. For instance, if guest users access the form, you must give the Guests user group permission to create tags.

Access Level

Set who will be able to access the article. This option lists all the available access levels for your convenience. If you map this option with a Smart Tag, ensure it returns a proper Access Level ID.

Start Publishing Date

Set a date to publish the article in Y-M-D H:M:S format. Leave it empty to publish the article immediately. If you map this option with a Date Time field, you must set its format to Y-m-d H:i.

Finish Publishing Date

Set a date to unpublish the article in Y-M-D H:M:S format. Leave it empty to never unpublish the article. If you map this option with a Date Time field, you must set its format to Y-m-d H:i.

Intro Image

The relative path of the image is meant to be used in the category, list, and featured views.

Full Article Image

The relative path of the image is meant to be used in the article details page.

Featured

Set whether the article will be featured or not. If you map this option with a Smart Tag, ensure it returns 0 or 1.

Language

If your site is multilingual, select the associated language of the article. Otherwise, select the “All” option (default). If you map this option with a Smart Tag, ensure it returns a valid language code, e.g., en-GB or el-GR. Return an asterisk ‘*’ if you don’t want to associate it with a language.

Note

Add a note to this article. This is displayed only on the backend of the article editing page.

Reading the new article details in the next step

Let’s say that after creating the Joomla article, you would also like to email the administrator letting them know that a new article has been submitted. To make the email more meaningful, you want to include the ID and the title of the article in the subject like this:

New Article Submission: #ARTICLE_ID - ARTICLE_TITLE

Once the Content app runs successfully and the article is created in the database, it exposes all article properties so they can read the next steps. That way, you can create advanced workflows and scenarios with your forms. For instance, if the Email app runs right after the Content app, you can read the ID and the Title of the article using the {task.prev.response.id} and {task.prev.response.title} Smart Tags respectively in any configuration option in the Email app.

So, in our case, the Email Subject option becomes:

New Article Submission: #{task.prev.response.id} - {task.prev.response.title}

Your screen should look like this:

dynamic email subject

With the same syntax, you read any article property like: alias, fulltext, state, catid, created_by, publish_up.

Troubleshooting

Below is a list of common issues you may encounter using this app. If you don't see your issue listed, open a support ticket with the relevant information related to your issue.

I am getting the error: incorrect datetime value: '10/05/2023’ for column 'publish_up' at row 1

You are using the wrong date format, either in the Start Publishing Date or Finish Publishing Date options. Both options expect the following date format: Y-M-D H:M:S.

Frequently Asked Questions

Can I update an existing article?

No. Updating an existing article is not currently supported, but it’s on our plans. You can use the Webhooks app to make this happen as a temporary workaround.

Can I populate custom fields?

Populating custom fields is not currently available. This capability will be added in a future release. Until then, you can update custom fields using the Webhooks app as a temporary solution.

Are there any alternative ways to create a Joomla Article?

If this article submission addon does not fit your needs, you can find other methods below to automatically generate a Joomla article when someone submits your form.