Skip to main content
1-Visitor
August 30, 2019
Solved

Changing buttons on the basis of selection in select widget

  • August 30, 2019
  • 1 reply
  • 1856 views

I want to change the buttons to be used according to the selection i made in select widget. Any idea how can i achieve it?

Also I am not comfortable with coding so a code according to my project will help me lot.

 I am also attaching the exported project file.

Best answer by RolandRaytchev

Hi @manojpandey ,

so answer it in the post, i hope

1 reply

21-Topaz I
August 30, 2019

Hi @manojpandey ,

 

what should happen here? I see there are some models already uploaded in the folder and you have a select.

Do you want to select these models - for display?

If no then please, let me know what is the issue - Pease provide more detailed information about the problem

if yes - so, I will suggest  to having the following behavior:

 

2019-08-30_16-29-46.jpg

To use the following code:

$scope.populateModelList = function() {

 $scope.my_json = [
 {
 display: "Suspension Assembly",
 value: "app/resources/Uploaded/Suspension_Low.pvz"
 },
 {
 display: "Arm Assembly",
 value: "app/resources/Uploaded/Arm_Assembly_Low.pvz"
 },
 {
 display: "Front Hub Assembly",
 value: "app/resources/Uploaded/Front_Hub_Low.pvz"
 },
 {
 display: "Shocker Assembly",
 value: "app/resources/Uploaded/Shock_Absorber_Low.pvz"
 }
 ];
 
console.warn( $scope.my_json );
$scope.view.wdg['select-1']['list'] = $scope.my_json ; 
twx.app.fn.addSnackbarMessage("assemblyList was populated","twLogo");
}
 

$scope.$on('$ionicView.afterEnter', function() {$scope.populateModelList();});
1-Visitor
September 2, 2019

Actually I want to place some buttons at the bottom of screen and I want that when i choose 'suspension assembly' some specific buttons should be displayed and when I choose other option such as 'arm assembly' some other buttons  should be displayed and the previous one should hide.

 

Also when i switch window, operation done by the previous button should be disabled.

21-Topaz I
September 3, 2019

Hi @manojpandey ,

so answer it in the post, i hope