[SOLVED] Loaded Text Input with floating label using Template7 isn't initialized

I need to append an html element that is created using template 7 to my view:

<div class="col-33 item-input">
	<div class="item-inner">
		<div class="item-title item-floating-label">Name</div>
		<div class="item-input-wrap">
<input type="text"  name="forename" value="{{escape forename}}">
			<span class="input-clear-button"></span>
		</div>
	</div>
</div>

and I add it this way using Dom7:

$$(".pane-wrapper").append( core_person_view( data ) );

and core_person_view is a compiled template; but when I do this the input is uninitialised and the floating label stays under the input value instead of going up. What should I do? Everything is working fine except this.

P.S. Also many thanks for this amazing set of libraries that you have created!

Maybe you have a live example or JSFiddle where we can check the issue?

https://jsfiddle.net/s9vuaLnj/12/

Because app doesn’t know about such inputs. Call checkEmptyState method after you added it to DOM https://jsfiddle.net/9zb35w82/

1 Like

Thanks man! I couldn’t find this in the docs. Now I looked and yup it was right there!