Multifunctional luminescent and proton-conducting lanthanide carboxyphosphonate open-framework hybrids exhibiting crystalline-to-amorphous- to-crystalline transformations