• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How create custom format to RSForm field?

How create custom format to RSForm field? 3 years 11 months ago #40206

Hi. The current version of RSForm is awesome, congratulations! :)
Please, would you like to know if I can create a specific format for a field in RSForm?
For example: the zip-code field here in Brazil is called CEP and it has this format: 99999-999. I wanted the user to type, the field would automatically format the entered value for this format. It's possible?
The administrator has disabled public write access.

How create custom format to RSForm field? 3 years 10 months ago #40285

  • bogdan.tataru
  • bogdan.tataru's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 174
  • Thank you received: 40
Hello,

You can achieve this by taking the following steps:

- find a JavaScript that provides such a mask like:

javascriptsource.com/imagesvr_ce/2082/dFilter.js

- take its contents (copy and paste) within a new file called dFilter.js

- place this file under:

/media/inputMask/dFilter.js

- while editing your form in the backend area > Properties > PHP Scripts > "Scripts Called On Form Display" area > here, add (this will load the script file on your form's page):

$doc = JFactory::getDocument();
$doc->addScript('media/inputMask/dFilter.js');

- finally, edit your zipcode textbox > Attributes > Additional Attributes area > add:

onkeypress="return dFilter(event.keyCode, this, '##### ###');"

- test this functionality one more time
My help is not official customer support. To receive assistance, submit a ticket by clicking here
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!