- Posts: 647
- Thank you received: 31
Create a custom field with value already filled in and not changeable
- David Unwin
-
Topic Author
- Offline
- Platinum Member
-
Less
More
2 years 10 months ago #154479
by David Unwin
Create a custom field with value already filled in and not changeable was created by David Unwin
We want to have a custom field in our subscription information.
This field will apply to both group admins and group members on one of our plans
This filed will also determine the Joomla group we assign the group member to.
We want the value to be fixed.
I tried setting the field as a LIST field with only one value and setting the default to the same value.
The problem with this is that the group admin can turn off the value by choosing SELECT. against the field
I have tried hiding this field on the form, but then the field is not filled in with the default.
Also the option to carry through from the Group admin field does not appear to work?
See screen shot for more information
Any ideas how I can achieve this?
This field will apply to both group admins and group members on one of our plans
This filed will also determine the Joomla group we assign the group member to.
We want the value to be fixed.
I tried setting the field as a LIST field with only one value and setting the default to the same value.
The problem with this is that the group admin can turn off the value by choosing SELECT. against the field
I have tried hiding this field on the form, but then the field is not filled in with the default.
Also the option to carry through from the Group admin field does not appear to work?
See screen shot for more information
Any ideas how I can achieve this?
- Tuan Pham Ngoc
- Offline
- Administrator
-
2 years 10 months ago #154484
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Create a custom field with value already filled in and not changeable
Hi David
I think you can try the options below to see if it works:
1. Set the field Required (set Required to Yes) so that group admin cannot choose Select option
2. Or hide the field using css
Could you please try that to see if it works?
Tuan
I think you can try the options below to see if it works:
1. Set the field Required (set Required to Yes) so that group admin cannot choose Select option
2. Or hide the field using css
Could you please try that to see if it works?
Tuan
Please Log in or Create an account to join the conversation.
- David Unwin
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 647
- Thank you received: 31
2 years 10 months ago #154489
by David Unwin
Replied by David Unwin on topic Create a custom field with value already filled in and not changeable
Hi Tuan,
I changed the field type to Radio and set the required field to Required to YES as you suggested...This worked fine....Thank you. See screen shots of settings and output.
I would also like to hide the field on display with css.
I see in the field elements there is Display Settings/ CSS Class.
I tried setting this to 'hide'
and then in Custom css I set #Hide {display:none;}
but it did not work? what am I doing wrong there?
David
I changed the field type to Radio and set the required field to Required to YES as you suggested...This worked fine....Thank you. See screen shots of settings and output.
I would also like to hide the field on display with css.
I see in the field elements there is Display Settings/ CSS Class.
I tried setting this to 'hide'
and then in Custom css I set #Hide {display:none;}
but it did not work? what am I doing wrong there?
David
- Tuan Pham Ngoc
- Offline
- Administrator
-
2 years 10 months ago #154490
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Create a custom field with value already filled in and not changeable
Hi David
That's not right css solution. You need to add css code to hide the whole div. Something like
#field_first_name
{
display: none;
}
Replace first_name in the above code with name of the custom field and it should work well
Tuan
That's not right css solution. You need to add css code to hide the whole div. Something like
#field_first_name
{
display: none;
}
Replace first_name in the above code with name of the custom field and it should work well
Tuan
Please Log in or Create an account to join the conversation.
- David Unwin
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 647
- Thank you received: 31
2 years 10 months ago #154491
by David Unwin
Replied by David Unwin on topic Create a custom field with value already filled in and not changeable
Hi Tuan,Yes that works fine.... Thank you
.I also wanted to stop the display of the TITLE. So I set the css to the followingÂ
Note 'type_fa1' is my field name
#type_fa1
{
display: none;
}
Below is the css to stop displaying the TITLE
#type_fa1-lbl
{
display: none;
}
This works fine. Note to other users: for this to work make sure there is that the Description of the field is empty, otherwise the Title will display
.I also wanted to stop the display of the TITLE. So I set the css to the followingÂ
Note 'type_fa1' is my field name
#type_fa1
{
display: none;
}
Below is the css to stop displaying the TITLE
#type_fa1-lbl
{
display: none;
}
This works fine. Note to other users: for this to work make sure there is that the Description of the field is empty, otherwise the Title will display
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
2 years 10 months ago #154494
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Create a custom field with value already filled in and not changeable
Your css looks a bit strange to me. But if it works, I'm fine. Please continue using the extension and if you need help, please don't hesitate to ask
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.