News:

Looking for documentation? Take a look on our wiki

Main Menu

Readonly state not affect on user fields

Started by d0ublezer0, December 03, 2018, 14:59:11 PM

Previous topic - Next topic

d0ublezer0

in VM backend we have "readonly" option for user fields
but this is not affect on anything in frontend

GJC Web Design

normal form etc?
I noticed this other day but only on using Frontend VM admin  ( readonly was not passed)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

d0ublezer0

User field, marked in backend as readonly should be also readonly in frontend on user edit page, i think

GJC Web Design

so do I but its not... 

Have discussed with Max before and I think in a forth coming release the readonly will be passed thru also to the fields

In the meantime you could change this in the userfields model

            $readonly = '';
            if(!$admin){
               if($_fld->readonly ){
                  $readonly = ' readonly="readonly" ';
               }
            }

if is detected as an admin view then the readonly isn't passed



GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

d0ublezer0

yes, this is the problem: user fields not pass readonly state

Also, if i modify userfields model - on next update it will be lost

Jörgen

QuoteHave discussed with Max before and I think in a forth coming release the readonly will be passed thru also to the fields

In the meantime you could change this in the userfields model

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.