Show internalID element in form

Status
Not open for further replies.

rackem

Well-Known Member
Is there a way to show the internalID element within a form? It shows up in my list OK. I have my element access settings "Editable" and "Viewable" set to Public.

I just want to display the value (users would never edit). I realize I could use a calc element or some custom JS to retrieve and then store the value in another field and then just display that but that isn't a very clean approach.

Perhaps there could be an "Hidden" (yes or no) option added?
 
:eek: Oh boy, is it really that easy? I presume it won't alter the element being auto-incrementing and all that other important stuff? I am kind of afraid to try it but I'll give it a shot when I get back to it!
 
Make sure you set the type to "Integer" in the field element settings, when you change the element type from ID to Field.

It should retain auto-inc status, as it's still known to the List settings as your PK.

But as usual, I would suggest backing that table up before doing this, just as a standard precaution when doing anything that involves primary keys, etc.

-- hugh
 
That seems to do it, thanks troester and Hugh! After changing the internalID elemen to an integer-type field element, I received the message: "Update field structure from int(11) auto_increment to INT(6)." I don't expect more than 1000 records so this should be plenty sufficient I presume.

For my form display, the field is set to "read only" provides exactly the functionality I needed. :)
 
Oh, just FYI, the X in INT(X) has no effect on the size of int you can store. It still creates a 32 bit INT. The X is just a more or less unused feature, which says how many total digits to use when displaying the number, with padding, for purposes of right justification. Bit it'll always store the full 32 but int, and will render correctly regardless.

http://dev.mysql.com/doc/refman/5.0/en/numeric-type-attributes.html

The only thing which affects the actual number values you can store is by using SMALLINT, TINYINT, BIGINT, etc.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top