Open Closed

Angular Identity and Account form extensions set-default-value using extra properties #7298


User avatar
1
gogu.stere@3sstudio.com created
  • ABP Framework version: v8.0.5
  • UI Type: Angular
  • Database System: EF Core
  • Steps to reproduce the issue:
  1. I have to add a new read-only input in the Personal Info form. I created an extension, and the input is displayed. I set the default value from extraProperties, but it is not displayed, although it is shown in the console log. Do you have any idea why the default value is not displayed or any tips on how to set a default value from extraProperties?" My default value is coming from ConfigStateService extraProperties.

  2. How to change or add new details in the 'View Details' section for a user?


5 Answer(s)
  • User Avatar
    -1
    Anjali_Musmade created
    Support Team Support Team Member

    Hello,

    Please check https://community.abp.io/posts/how-to-add-custom-property-to-the-user-entity-6ggxiddr if it helps you.

    Thanks

  • User Avatar
    1
    gogu.stere@3sstudio.com created

    Hello,

    Thanks for the response, but i didn't managed to solve my problems.

    Have a nice day.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Developer

    Hello, I will need to ask you a couple of small details to be able to assist you further.

    First of all, did you set the config state service to get the related value as mentioned here in the documentation?

    If you did so, you need to initialize the value of profileinfoCustomerNameExtension so that you can assign the default value accordingly. Here is an example of how you can manage this:

    const profileinfoCustomerNameFormProp = new FormProp(profileinfoCustomerNameExtension);
    
    export function profilePropContributor(propList: FormPropList<IdentityUserDto>) {
      profileinfoCustomerNameFormProp.defaultValue = profileinfoCustomerNameExtension.defaultValue;
      propList.addTail(profileinfoCustomerNameFormProp);
    }
    

    Secondly, you can follow this documentation which explains entity action extensions to be able to create a customized modal. For the time being, you cannot directly tailor the view details modal.

  • User Avatar
    0
    gogu.stere@3sstudio.com created

    Hi,

    Thanks for the response.

    I cannot set the default value because it is read-only. The profileinfoCustomerNameExtension has the required default value, but it is not setting the default value to the profileinfoCustomerNameFormProp.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Developer

    Hello, the pleasure is mine for helping. I also see your point and you are right this value is readonly which is not mutable directly. I can suggest you to implement a workaround or use the Writable feature of typescript to make it mutable.

Made with ❤️ on ABP v9.0.0-preview Updated on July 18, 2024, 06:07