Jump to content

Recommended Posts

Posted

I need to make a field read-only and is not editable, is that in this field show the transaction number of the payment gateway

thanks in advance

Posted

Hi, Diegonella.

Try to use this module. Put it in your site/modules folder. Your fieldtype for transaction number has to be a textarea. After you've installed the module, select InputfieldTextareaLookup for your transaction number fieldtype on it's Input tab. Now your field will display as a paragraph so user won't change it.

Please, let me know if it works as I didn't test it.

Cheers!

InputfieldTextareaLookup.module

  • Like 4
  • 1 year later...
Posted (edited)

@slkwrm

Thanks for this module.

I have just used this module and it works. My application is to add a field to the top of some admin pages that will contain instructions/information for the client when they edit the page. So I created a  field called 'admin_info' as a textarea, added the required text instructions then changed the Inputfieldtype to 'textareaLookup'. If I need to amend the instructions I will change the inputfieldtype back to 'textarea', apply the changes then change back to 'textareaLookup to make it read-only.

@Ryan This module does not appear in the modules page (or I couldn't find it!), is there a reason for this?

Additionally: If you want to style the read-only text, set inputfieldtype to TinyMCE, edit the field on the page in html mode and add a class to the <p>. Add the css to the main.css file in wire > templates-admin > styles. Remember to set the inputfieldtype back to textareaLookup afterwards. I tested this and the <p> class is held after the inputfieldtype change.  

Edited by NooseLadder
  • 2 weeks later...
Posted
@Ryan This module does not appear in the modules page (or I couldn't find it!), is there a reason for this?

Nobody has added it to the modules page. This is up to the author of the module as to whether they want to add it to the modules directory or not. 

I also wanted to mention that the dev branch of PW has a "locked" option for inputs, which may produce a similar result. See the screenshot:

post-2-0-49565900-1381575321_thumb.png

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...