Image A

image B,

how to do it,?


when i select the gender custom automatically custom inbox showing 

image A and Image B example of my question how to do it??

Hi Hafiz,


You can use "onchange" action for this


when user select value from drop down or combo box than onchange action fire.

and this custom inbox take into in div set this visible property according variable (isShow) True or False.
when user select value from drop down check this value is custom than show this div else false.


Hope this will Help you.

Regard

Rahul Sahu

Hello Hafiz,


Edit: To solve the visibility of fields problem, read the answer above, to customize the combobox, read mine.


First of all, create a class in your stylesheet, for this example we will use "custom-combo":


    .custom-combo{       

        border: 2px #00f solid;

    }



Assign an OnChange action to this combo box, on that action what you have to do is:

1 - Verify If combo box selected value is now "Custom"

2 - If so, run this javascript code ("RunJavascript" action, from HttpRequestHandler Module):

   "

   var element = document.getElementById('" + <ComboBox.Id> + "');    element.classList.add("custom-combo");

  "


Change <ComboBox.Id> for your combobox name .Id value

To remove the class, in case of the user changes his selection, use this snippet to remove your custom style:

     element.classList.remove("custom-combo");


This should solve your problem, if you have any aditional doubts please be my guest ;)


Kind Regards,

JD



Hi Hafiz,

For showing extra form fields in case of custom. You can simply put extra form fields in a container and assign visibility of this container to a boolean variable.

Then in Onchange of dropdown, check if selected value is "custom". If its custom then change the value of boolean variable to true, so container will be visible.

Thanks.

vikas sharma wrote:

Hi Hafiz,

For showing extra form fields in case of custom. You can simply put extra form fields in a container and assign visibility of this container to a boolean variable.

Then in Onchange of dropdown, check if selected value is "custom". If its custom then change the value of boolean variable to true, so container will be visible.

Thanks.

are you give me oml of this task


Hafiz Shaheed wrote:

Image A

image B,

how to do it,?


when i select the gender custom automatically custom inbox showing 

image A and Image B example of my question how to do it??

Hi Hafiz,

As you are using treditional web app so you can create on container and add extra fields which you want to show on specific condition. Set your condition in Display property of the container like below

Gender = "Custom"

or  if you are using static entity

Gender = Entities.Gender.Custom

Here Gender is the variable set in variable property of combobox.

After this you have to create OnChange Event of the combobox and have to ajax refresh your container you created above. Without this step display contition will not work upon change in gender in traditional web apps.

Solution

Hi Hafiz,

Although Nikhil explained already. I created a demo for this. Its in ReactiveWeb, but concept will be same for other type of application as well.


Thanks.

Solution

vikas sharma wrote:

Hi Hafiz,

Although Nikhil explained already. I created a demo for this. Its in ReactiveWeb, but concept will be same for other type of application as well.


Thanks.

thank you:) I will try  web traditional 


vikas sharma wrote:

Hi Hafiz,

Although Nikhil explained already. I created a demo for this. Its in ReactiveWeb, but concept will be same for other type of application as well.


Thanks.


m trying but no working and I attached  oml plz what I wong??

Hi  Hafiz,

I checked the OML, everything is right. Only mistake seems that you are  not handling container visibility using a Boolean variable. Right now you have given it static true value. Instead of this, you need to use a boolean variable, which is "isVisible" in your case and also need to update value of this variable when user select "custom" from dropdown.

Thanks

can you give me screenshot because i cant OR you can change on my oml

Hi Hafiz,


see the below image, provide name for input which you want show and use ajax refresh at last


Hope this will help you.

Regards

Rahul Sahu