JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › General Discussions › Load form from internet is possible?
- This topic has 4 replies, 2 voices, and was last updated 2 years, 9 months ago by admin.
-
AuthorPosts
-
February 4, 2022 at 4:36 am #102852Joko PitoyoParticipant
<div>
<div>//file create_form_user.php</div>
<div>
<div>
<div><smart-form id=”profileForm”></div>
<div> <smart-form-group id=”employee” label=”Employee” data-field=”employee”></div>
<div> <smart-form-group data-field=”name”></div>
<div> <smart-form-control column-span=”2″ label=”Photo” control-type=”template”></div>
<div> <div style=”overflow: hidden;”></div></div>
<div> </smart-form-control></div>
<div> <smart-form-control info=”Enter First Name” required placeholder=”First Name” control-type=”input” data-field=”firstName” label=”First Name” class=”outlined”></smart-form-control></div>
<div> <smart-form-control info=”Enter Last Name” required placeholder=”Last Name” control-type=”input” data-field=”lastName” label=”Last Name” class=”outlined”></smart-form-control></div>
<div> </smart-form-group></div>
<div> <smart-form-group label=”Details” data-field=”details”></div>
<div> <smart-form-control placeholder=”Company Name” required control-type=”input” data-field=”company” label=”Company” class=”outlined”></smart-form-control></div>
<div> <smart-form-control placeholder=”Address” required control-type=”input” data-field=”address” label=”Address” class=”outlined”></smart-form-control></div>
<div> <smart-form-control placeholder=”City” required control-type=”input” data-field=”city” label=”City” class=”outlined”></smart-form-control></div>
<div> <smart-form-control placeholder=”State” required control-type=”input” data-field=”state” label=”State” class=”outlined”></smart-form-control></div>
<div> <smart-form-control placeholder=”Zip / Postal Code” required control-type=”input” data-field=”zip” label=”Zip / Postal Code” class=”outlined”></smart-form-control></div>
<div> </smart-form-group></div>
<div> <smart-form-group columns=”2″></div>
<div> <smart-form-control align=”right” control-type=”submit” label=”Submit” class=”primary”></smart-form-control></div>
<div> <smart-form-control align=”left” action=”reset” control-type=”button” label=”Reset”></smart-form-control></div>
<div> </smart-form-group></div>
<div> </smart-form-group></div>
<div></smart-form></div>
<div></div>
</div>
</div>
<div></div>
<div>$.ajax({</div>
<div> url:’../scripts/user/create_form_user.php’,</div>
<div> success:function(result){</div>
<div> document.getElementById(‘formUser’).innerHTML=result;</div>
<div></div>
<div> })</div>
</div>February 4, 2022 at 6:11 am #102853Joko PitoyoParticipantthanks this work for me
February 4, 2022 at 7:51 am #102856Joko PitoyoParticipantthis work for me, but when submit, no data send to action
<form id=”profileForm” method=”post” action=”../scripts/user/save.php”>
<div class=”smart-form-row”>
<label>
Login Name:
</label>
<smart-input class=”underlined” form-control-name=”login”></smart-input>
</div>
<div class=”smart-form-row”>
<label>
E-Mail:
</label>
<smart-input class=”underlined” form-control-name=”email”></smart-input>
</div>
<div class=”smart-form-row”>
<div class=”smart-form-row”>
<label>
Street:
</label>
<smart-input class=”underlined” form-control-name=”street”></smart-input>
</div><div class=”smart-form-row”>
<label>
City:
</label>
<smart-input class=”underlined” form-control-name=”city”></smart-input>
</div><div class=”smart-form-row”>
<label>
State:
</label>
<smart-input class=”underlined” form-control-name=”state”></smart-input>
</div><div class=”smart-form-row”>
<label>
Zip Code:
</label>
<smart-input class=”underlined” form-control-name=”zip”></smart-input>
</div>
</div>
<div class=”smart-form-row submit”>
<!– <smart-button class=”success” form-control-name=”submit” type=”submit”>Submit</smart-button> –>
<smart-button id=”btnCancel” class=”small-button error”>Cancel/Close</smart-button>
<smart-button id=”btnSave” class=”small-button success”>Save</smart-button>
</div>
</form>//javascript
document.getElementById(‘profileForm’).submit();
February 4, 2022 at 7:53 am #102857Joko PitoyoParticipantanother trial load dynamic form;
//dynamic_form.php
<smart-form id=”profileForm”>
<smart-form-group id=”employee” label=”Employee” data-field=”employee”>
<smart-form-group data-field=”name”>
<smart-form-control info=”Enter First Name” required placeholder=”First Name” control-type=”input” data-field=”firstName” label=”First Name” class=”outlined”></smart-form-control>
<smart-form-control info=”Enter Last Name” required placeholder=”Last Name” control-type=”input” data-field=”lastName” label=”Last Name” class=”outlined”></smart-form-control>
</smart-form-group>
<smart-form-group label=”Details” data-field=”details”>
<smart-form-control placeholder=”Company Name” required control-type=”input” data-field=”company” label=”Company” class=”outlined”></smart-form-control>
<smart-form-control placeholder=”Address” required control-type=”input” data-field=”address” label=”Address” class=”outlined”></smart-form-control>
<smart-form-control placeholder=”City” required control-type=”input” data-field=”city” label=”City” class=”outlined”></smart-form-control>
<smart-form-control placeholder=”State” required control-type=”input” data-field=”state” label=”State” class=”outlined”></smart-form-control>
<smart-form-control placeholder=”Zip / Postal Code” required control-type=”input” data-field=”zip” label=”Zip / Postal Code” class=”outlined”></smart-form-control>
</smart-form-group>
<smart-form-group columns=”2″>
<smart-form-control align=”right” control-type=”submit” label=”Submit” class=”primary”></smart-form-control>
<smart-form-control align=”left” action=”reset” control-type=”button” label=”Reset”></smart-form-control>
</smart-form-group>
</smart-form-group>
</smart-form>//javascript
$(“#container”).load(‘dyanmic_form.php’,function(){});
form not appear
February 4, 2022 at 8:29 am #102858adminKeymasterHi Joko,
Please, look at: https://www.htmlelements.com/demos/form/overview/. On submit, the form sends the data as it is a normal HTML Form element.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.