Categories
CMS Development Drupal

Using #states in a form with checkboxes

I would like when a client check one of the checkboxes, a text field appeares. Example: if he clicks on 3 checkboxes, all the textfields of the 3 show off. My #checkboxes : $form[‘input’][‘livraison’] = [ ‘#title’ => t(‘Options de livraison (à la charge de l’acheteur)’), ‘#type’ => ‘checkboxes’, ‘#description’ => t(”), ‘#options’ => [ […]

Categories
Development

Why is my checkbox not reflecting the value of the underlying state?

I am iterating over the brands shown in the object below and populating checkboxes in the page. brandFilter: { title: ‘Brands’, brands: [ { name: ‘Amana’, checked: true}, { name: ‘Whirlpool’, checked: false }, { name: ‘Frigidaire’, checked: false }, { name: ‘GE’, checked: false }, ] }, The component code to create the checkboxes […]

Categories
ASP.NET Development MVC

How to implement dynamic resource permission in asp.net MVC?

I want to implement dynamic authorization in my ASP.NET MVC project where resource permissions can be assigned to both user and role dynamically by the system admin. I’m using the following tables to manage permissions. Resource ResourcePermission Models for these tables are public class Resource { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } […]

Categories
Development

checking if the updated state ad prevstate are same or not

I have my initial state data = [{ id: 122, checked: false }, { id: 129, checked: true }, { id: 198, checked: false } ] Now after performing some actions and changing states, the state of data remains of the same or the values inside the data remain the same .

Categories
Development React

Reference error when trying to access a variable defined inside a constructor in react-native

I need to implement a checkbox component in react-native which should work in both ios and android. I tried using CheckBox component of react-native, but it doesn’t work in ios. So, I took the below code from a website, import React, { Component } from ‘react’; import { Alert, Image, Platform, StyleSheet, Text, TouchableHighlight, View […]

Categories
Development

unable to get value of checkbox using ngModel

I try to get the value of a checkbox, but I got undefined in my console. When I will be able to get the value, I will save the data into firebase. <ion-item *ngFor=’let rep of reponse;let i = index’> <ion-label></ion-label> <ion-checkbox [(ngModel)]=”rep.checked” color=”primary” (ngModelChange)=”updatedCheckList(i)” slot=”start” > </ion-checkbox> </ion-item> <ion-button (click)=”onClick()”></ion-button> and my typescript code: […]

Categories
Angular Development

Populating an Angular Material Dialog with data from another component

I have an Angular Material application as a class assignment. The premise is a computer repair shop with a list of services. The user checks the services they want and clicks the Calculate button, and then an invoice pops up with the services the user has chosen and a total cost for those services. I […]

Categories
Ask

Alert isn’t showing the translated Text

I’m still developing an Ionic 4 Angular App. I know, that this is still a bit buggy but I wanted to try it in this Version. Currently I am stuck with the Alerts of Ionic. I want to translate the whole app in several languages with the ngx Translateservice. This works just fine except with […]