Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #102852
    Joko Pitoyo
    Participant

    <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>

    #102853
    Joko Pitoyo
    Participant

    thanks this work for me

    #102856
    Joko Pitoyo
    Participant

    this 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();

     

    #102857
    Joko Pitoyo
    Participant

    another 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

    #102858
    admin
    Keymaster

    Hi 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 Stoev

    Smart UI Team
    https://www.htmlelements.com/

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.