The Techjoomla Blog

Stay updated with all the latest happenings at Techjoomla. From news about the developments in your favourite extensions to Tips & Tricks about the Joomla CMS, Framework & Development.

Using custom field of jform create textcounter

Joomla already has powerful form management libraries - jform, supported by jfield. There is plenty of built-in field types (text, textarea, integer, file, calendar and several more). However, once in a while you come across a special field that is not present. Or maybe extending the existing field types to add more features.

These are perfect candidates for creating your own JFields. The JField class is very easy to understand, and using the same you can create any kind of simple or complex fields. Bear in mind that while the JField class will render your field, it's up to your model to save the data.

In a recent project, I had to create a text field with a character limit and a  character counter. My earlier thought was to include a piece of javascript, but I soon realised that  this was a good opportunity to create a reusable field which supports the above. So today I will be explaining how to create your own JFields through an example of the character counter field.

...
Rate this blog entry:
Continue reading
192 Hits
0 Comments

Using sub-forms to create repeatable fields

Forms are everywhere on the web. From a simple sign up form to complicated application forms you’ve seen various forms with varying validation and fields. A very popular way to ask users to input multiple values for similar data is to use the “Add More” type field where the user can add any number of entries. Examples are Educational Qualification, Previous Employment History etc.

Joomla too supported the add more fields natively, by use of the repeatable element. However it had a few limitations

  • The sub fields show up in a popup, and not inline
  • It’s not easy to customise the layout of the popup

We’d tried to overcome these in a recent project by improving the repeatable field, but while we were doing that we realised that Joomla 3.6 has solved this in a much better way! Welcome “sub forms”. This provides a way to use JForm XML inside existing forms, by way of including another XML in lieu of a field in the parent XML. With sub-forms you can -

...
Rate this blog entry:
Continue reading
15140 Hits
0 Comments

How to make a URL SEF when triggered from Joomla backend?

How to make a URL SEF when triggered from Joomla backend?

Any Joomla developer worth his salt knows to use JRoute::_() to ensure he produces SEF URLs. This is an important SEO thing! However, if you’re writing code that does things from the Joomla Admin, the URLs turn out to be non-SEF. No I’m not talking about the URLs of the Joomla Admin itself.

For Instance,

Shika sends a notification email with a link to the course when a user enrolls for a course. When the user enrolls from the frontend, the email contains the shiny SEF URL. But if the admin enrolls the user, the email contains a non-SEF link in spite of correctly using JRoute::_() Don’t believe us ? Try for yourself :) Depending on the type of link you are creating the link might even have the part /administrator in it.

...
Rate this blog entry:
Continue reading
3409 Hits
0 Comments

Send Joomla email via Amazon SES

Reliable email delivery is key in web applications, you don't want your customers to miss that order confirmation email or skip that very important Social Network notification. When using a service like Amazon SES, that additionally helps you improve your email sending quota if your web host gives you a rather small quota. It's fairly easy to get up and running with Amazon SES. You'll need to have an account with Amazon AWS (of course!)

Then, just follow these steps to get going -

Set up your Amazon SES account for sending

...
Rate this blog entry:
Continue reading
2529 Hits
0 Comments

Supporting custom module positions in your Joomla extension

Supporting custom module positions in your Joomla extension

Note: This Blog is targeted to developers!

Sometimes the module positions that come with your template are just not enough, or if you’re a developer you might want to allow your users to load modules inside various parts of your component.

A good example is if you want to publish Ads coming from SocialAds on your EasySocial stream without changing any default functionalities of the stream. You'd do this by loading the Social Ads module in one of the various positions that Easysocial has already set up on their stream. 

...
Rate this blog entry:
Continue reading
1774 Hits
0 Comments