Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Form builder url field and its select button

edited January 9 in Modules

I have a field named "gateway_url" and in CMS admin pages this will appear with a select button next to it, as it has a custom field representation associated with it. However, in "edit" mode, I want this field as "readonly", but the select button still appears when readonly is defined. I don't want to rename the field, so how could I avoid this button appearing?

My goal is to show the value of gateway_url, but not allow it to be re-edited after creation.

Comments

  • Is the enclosing CSS different when in readonly mode? Maybe some custom CSS might be enough for you if you can hook it to a readonly class?

  • It sounds like it's using the URL field type because it has the text URL in the name of the field. You can use the parameter ignore_representative => TRUE when defining your field so that it will become a basic text field.

  • Thanks both of you - I found out another way - using the 'displayonly' => TRUE parameter will also not show a select button!

    But admin's solution seems definitive, so I have used that.

Sign In or Register to comment.