×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Change default behavior for form fields
Nancy Anderson
Bakır Üye
Posts: 20
10 yıl 1 hafta önce #478
Yazan: Nancy Anderson
Change default behavior for form fields, Nancy Anderson tarafından oluşturuldu
Hi,
I inherited a component and a few of the table filed names appear to be joomla reserved words.
For example, there is an address table that has a field named 'state'. Joomla is interpreting that as the published/unpublished field. So here's the question,
1. Can I mark the field in the component creator in some way to stop that from happening automatically in the code?
2. Where would I need to change the code for the admin edit forms to stop the default rendering of this field as a drop down.
(I found where to do that in the lists, but it isn't as obvious in the edit screen.)
thanks,
nancy
I inherited a component and a few of the table filed names appear to be joomla reserved words.
For example, there is an address table that has a field named 'state'. Joomla is interpreting that as the published/unpublished field. So here's the question,
1. Can I mark the field in the component creator in some way to stop that from happening automatically in the code?
2. Where would I need to change the code for the admin edit forms to stop the default rendering of this field as a drop down.
(I found where to do that in the lists, but it isn't as obvious in the edit screen.)
thanks,
nancy
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Erik van Doorne
Yeni Üye
Posts: 9
9 yıl 11 ay önce #516
Yazan: Erik van Doorne
Erik van Doorne tarafından Change default behavior for form fields konusunda yanıtlandı
Hi Nancy, I pointed out this is happening in other situations and with other reserved words as well. The form should validate for/against reserved words and not allow you to use them as field names.
Have you tried simply renaming the field name ?
Regards,
Erik
Have you tried simply renaming the field name ?
Regards,
Erik
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Nancy Anderson
Bakır Üye
Posts: 20
9 yıl 11 ay önce #519
Yazan: Nancy Anderson
Nancy Anderson tarafından Change default behavior for form fields konusunda yanıtlandı
Hi,
Thanks.
Just for clarity the component was already built, I was trying to use Component Creator to build a admin back end for it. Changing the field name would impact a moblie app that is already in use, so that is not an option, darn it. Obviously, for new compuents this isn't a problem. I ended up using Fabrik. It's definitely not CC, but for this use it worked okay.
thanks again,
nancy
Thanks.
Just for clarity the component was already built, I was trying to use Component Creator to build a admin back end for it. Changing the field name would impact a moblie app that is already in use, so that is not an option, darn it. Obviously, for new compuents this isn't a problem. I ended up using Fabrik. It's definitely not CC, but for this use it worked okay.
thanks again,
nancy
Lütfen sohbete katılmak için Giriş ya da Hesap açın.
Sayfa oluşturma süresi: 0.050 saniye