Skip to content

Instantly share code, notes, and snippets.

View zaclittleberry's full-sized avatar

Zac Littleberry zaclittleberry

View GitHub Profile
@zaclittleberry
zaclittleberry / form-radio-value-error.md
Created January 2, 2019 17:58
detailing error with ionic reactive form ion-radio-group and nested values

If we have an ion-radio-group with a formControlName, and nested in that ion-radio-group we have ion-radio elements with value attributes, and also other elements with value attributes (such as ion-datetime in our case), the ion-radio-group form control value will be the value of whatever child element value was last set.

<ion-radio-group formControlName="hoursType" class="time-group">

  <div class="weekdays-time">
    <ion-item>
HousingDB
Landing Page
menu -> Menu
login -> Login
browse landlords -> View Landlords
View Landlords
menu -> Menu
View Properties
menu -> Menu
Login
@zaclittleberry
zaclittleberry / custom_module.module.php
Last active March 5, 2017 15:04
Drupal hierarchical taxonomy terms find/create from an array
<?php
/**
* Helper function to retrieve tid of nested term, by tracing or creating terms.
*
* @param array $term_names
* The term names used to create the hierarchy from the parent to the child.
*
* @param string $vocabulary
* The machine name of the vocabulary the terms should be found/built within.
@zaclittleberry
zaclittleberry / in_page_search_highlighter.html
Created February 19, 2017 18:47
A little script demonstrating a search form that will scan elements on a page (currently anchors) and highlight them if they contain the search phrase
<!DOCTYPE html>
<html>
<head>
<title>Highlighter</title>
<style>
.highlight {color: orange;}
a {color: blue; text-decoration: none;}
</style>
</head>
<body>