teng84 Posted December 2, 2012 Share Posted December 2, 2012 How can i remove the form tags when i call the form by renderPartial? I have 4 forms from dixx views and i want to combine them into one sinlge form so when i cal render partial form tags should not be included. thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/271467-remove-form-tags-when-calling-renderpartial-in-yii/ Share on other sites More sharing options...
Mancent Posted December 2, 2012 Share Posted December 2, 2012 see if you can use any of this code to try to do what you want.. i didnt understand to well <style type="text/css"> span.About { background:url(images/ABOUT.png) top center no-repeat; display:block; height:26px; border:none; } span.AboutMore { background:url(images/ABOUT.png) top center no-repeat; display:block; height:26px; border:none; } </style> <? $checked = "checked"; if (!empty($_POST['newClient'])) { echo '$checked'; ?> <input name="newClient" type="radio" id="id_radio1" value= "check1" checked="<? $checked ?>" onclick="javascript:Function_Name();"/> New Client <? } else { ?> <input id="id_radio2" type="radio" value= "check2" name="returningClient" checked="<? $checked ?>" onclick="javascript:Function_Name_2();" />Returning Client <? } ?> <br /> THIS IS MY DROP DOWN MENU TO DISPLAY.<br /> <select> <option>Seleccionar</option> <option value="Casa" onclick="javascript:Function_Name();"><a href="#">New Client</a></option> <option value="Casa" onclick="javascript:Function_Name_2();"><a href="#">Returning Client</a></option> </select><br /> THIS IS MY BUTTON TO DISPLAY MY FUNCTION BLOCK!<br /> <!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM--> <span class="About" onclick="javascript:Function_Name();"><a href="#"></a></span><br /> <!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM--> <span class="AboutMore" onclick="javascript:Function_Name_2();"><a href="#"></a></span><br /> <div id="myfuction" style="display: none;padding: 5px;"> THIS IS MY FUCTION TEST BLOCK I WANT TO DISPLAY! NEW CLIENT </div> <div id="myfuction_2" style="display: none;padding: 5px;"> THIS IS MY FUCTION TEST BOCK 2 I WANT TO DISPLAY! RETURNING CLIENT </div> <script type="text/javascript"> function Function_Name() { if(document.getElementById('myfuction').style.display=='none') { //THIS IS SHOWING THE DIV TAG div = document.getElementById('myfuction'); div.style.display = "block"; //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE div = document.getElementById('myfuction_2'); div.style.display = "none"; } else { //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS div = document.getElementById('myfuction'); div.style.display = "none"; } } function Function_Name_2() { if(document.getElementById('myfuction_2').style.display=='none') { //THIS IS SHOWING THE DIV TAG div = document.getElementById('myfuction_2'); div.style.display = "block"; //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE div = document.getElementById('myfuction'); div.style.display = "none"; } else { //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS div = document.getElementById('myfuction_2'); div.style.display = "none"; } } </script> Quote Link to comment https://forums.phpfreaks.com/topic/271467-remove-form-tags-when-calling-renderpartial-in-yii/#findComment-1396802 Share on other sites More sharing options...
trq Posted December 2, 2012 Share Posted December 2, 2012 Mancent, I fail to see how that code relates to the question. Quote Link to comment https://forums.phpfreaks.com/topic/271467-remove-form-tags-when-calling-renderpartial-in-yii/#findComment-1396818 Share on other sites More sharing options...
Mancent Posted December 2, 2012 Share Posted December 2, 2012 Well couldn't he place the form tags in a div tags he has 4 forms tags and he wants to put it all in one? I think that's what hes saying. How can i remove the form tags when i call the form by renderPartial? I have 4 forms from dixx views and i want to combine them into one sinlge form so when i cal render partial form tags should not be included. thanks in advance <form id="one"> </form> <form id="two"> </form> <form id="three"> </form> <form id="four"> </form> i say if statements is it php? it has to be simple. but I don't see any code to understand what hes doing. I would just call the tag when i need it, and if it changes call another. Quote Link to comment https://forums.phpfreaks.com/topic/271467-remove-form-tags-when-calling-renderpartial-in-yii/#findComment-1397010 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.