Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 16 Hours, 31 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

Add attribute to a field
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Add attribute to a field
#8813
Add attribute to a field 1 Year, 9 Months ago  
I am trying to use rereplacer to make a text field "readonly"

Any help on this would be much appreciated.

The code looks like this:

<input type="text" value="12" maxlength="100" size="50" name="title" id="title" class="inputbox">

it needs to look like:

<input type="text" value="12" maxlength="100" size="50" name="title" id="title" class="inputbox" readonly="readonly">


Keep in mind that the value"12" is not always going to be "12". That value could be different from page to page. So somehow I need to add readonly="readonly" to all the text fields with the id="title".

Thanks,
Dave
Dave K
Posts: 10
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#8824
Re: Add attribute to a field 1 Year, 9 Months ago  
Try this:
Search (regex):
(<input type="text"[^>]*id="title")

Replace:
\1 readonly="readonly"
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 1
Moderators: Peter van Westen
Open Source Training | Online Joomla! Training and Support
hosting joomla
MaxCDN | Content Delivery Network | Accelerate your site to the max