Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

how create form step by step in my site smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
michael20fr
Smarty Rookie


Joined: 30 Dec 2017
Posts: 6

PostPosted: Sat Dec 30, 2017 4:39 pm    Post subject: how create form step by step in my site smarty Reply with quote

Hello friends ,

my site was created with the smarty framework by a person that i buy this script.
the problem is that I am not develop pro, I'm doing pretty well in css and html, php also a can and javascript also a bit.

here is the mission if you accept it lol.

I have a form on my site here:

http://www.jrencontre.fr/account/register/

which is very very long.

I would like to make it etape by etap like this site.

https://www.w3schools.com/howto/howto_js_form_steps.asp

so I find both files that create this signup page

here is the php file that connects and takes data from the database

https://pastebin.com/MEZkgWvH

And here is the TPL

https://pastebin.com/D62Tm1Z2

how can I do to do that?

https://www.w3schools.com/howto/howto_js_form_steps.asp

thank you for your help I am a beginner in php
Back to top
View user's profile Send private message
michael20fr
Smarty Rookie


Joined: 30 Dec 2017
Posts: 6

PostPosted: Sun Dec 31, 2017 1:20 pm    Post subject: Reply with quote

Up no help ?? please
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun Dec 31, 2017 6:51 pm    Post subject: Reply with quote

You have to program each step separately yourself.
Back to top
View user's profile Send private message
michael20fr
Smarty Rookie


Joined: 30 Dec 2017
Posts: 6

PostPosted: Sun Dec 31, 2017 6:59 pm    Post subject: Reply with quote

ah ok then i have to cut the tpl file in several times? and make links between the pages?

but the problems and that if you see the code:


<!-- IF field_type = "text" -->
<input type="text" class="form-control" id="field_{field_label}" name="{field_label}" style="width: {field_width}" value="{htmlentities:field_value}" maxlength="{field_maxlength}" />
<!-- ELSEIF field_type = "image" -->

<input type="file" class=" form-control" id="field_{field_label}" name="{field_label}" />

<!-- IF field_value != "" -->
<a target="_blank" href="{top.virtual_pic_path}{field_value}">View file</a>&nbsp;


<label><input class="checkbox" id="{field_label}_remove" name="{field_label}_remove" type="checkbox" value="1">&nbsp;{lang:"profile","remove"}</label>
<!-- ENDIF -->
<!-- ELSEIF field_type = "textarea" -->
<textarea class="form-control" id="field_{field_label}" name="{field_label}" style="width: {field_width}; height: {field_height}">{htmlentities:field_value}</textarea>
<!-- ELSEIF field_type = "checkbox" -->


<ul class="fielditems">
<!-- INBEGIN field_items -->
<li><label>{checkboxes:parent.field_label,rowcnt,parent.field_value,inner_key}&nbsp;{inner_value}</label></li>
<!-- END field_items -->
</ul>

<!-- ELSEIF field_type = "radio" -->
<ul class="fielditems">
<!-- INBEGIN field_items -->
<li><label>{radiobuttons:parent.field_label,rowcnt,parent.field_value,inner_key}&nbsp;{inner_value}</label></li>
<!-- END field_items -->
</ul>

<!-- ELSEIF field_type = "combo" -->
<select class="form-control select" id="field_{field_label}" name="{field_label}">{dropdownlist:field_items,field_value}</select>
<!-- ELSEIF field_type = "birthday" -->
<div class="form-inline">
<!-- IF session.timeformat -->
<select class="form-control select" name="{field_label}_month">{dropdownlist:top.months,field_value_month}</select>
<select class="form-control select" name="{field_label}_day">{dropdownlist:top.days,field_value_day}</select>
<!-- ELSE -->
<select class="form-control select" name="{field_label}_day">{dropdownlist:top.days,field_value_day}</select>
<select class="form-control select" name="{field_label}_month">{dropdownlist:top.months,field_value_month}</select>
<!-- ENDIF -->

<select class="form-control select" name="{field_label}_year">{dropdownlist:top.birthday_years,field_value_year}</select>
</div>
<!-- ELSEIF field_type = "date" -->
<div class="form-inline">
<select class="form-control select" name="{field_label}_month">{dropdownlist:top.months,field_value_month}</select>
<select class="form-control select" name="{field_label}_day">{dropdownlist:top.days,field_value_day}</select>
<select class="form-control select" name="{field_label}_year">{dropdownlist:years,field_value_year}</select>
</div>
<!-- ELSEIF field_type = "time" -->
<div class="form-inline">
<select class="form-control select" name="{field_label}_hour">{dropdownlist:top.hours,field_value_hour}</select>
<select class="form-control select" name="{field_label}_minute">{dropdownlist:top.minutes,field_value_minute}</select>
</div>
<!-- ELSEIF field_type = "datetime" -->
<div class="form-inline">
<select class="form-control select" name="{field_label}_month">{dropdownlist:top.months,field_value_month}</select>
<select class="form-control select" name="{field_label}_day">{dropdownlist:top.days,field_value_day}</select>
<select class="form-control select" name="{field_label}_year">{dropdownlist:years,field_value_year}</select> @
<select class="form-control select" name="{field_label}_hour">{dropdownlist:top.hours,field_value_hour}</select>
<select class="form-control select" name="{field_label}_minute">{dropdownlist:top.minutes,field_value_minute}</select>
</div>
<!-- ENDIF -->

</div>
</div>


you notice that for each type of radio fields, selector, text, etc ... groups of fields, are dynamically generated ?? so how to cut on several pages?

Thank you for your help..
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun Dec 31, 2017 8:02 pm    Post subject: Reply with quote

To begin with, please understand the nature of HTTP communication, which is a request-response model.
There's no "forms" on the server, only "request".
You decide, what you want to see in the request, and you tailor your response to suit.
Once you know what should be in the request, you know what form fields you need to create for client to prepare it.
HOW would you create it, doesn't matter.
Back to top
View user's profile Send private message
michael20fr
Smarty Rookie


Joined: 30 Dec 2017
Posts: 6

PostPosted: Sun Dec 31, 2017 8:14 pm    Post subject: Reply with quote

sorry to be so bad, I am a beginner in php / html.

with the elements that I give you can you show me an example?

how should I proceed?

or tutorial?

because I'm really lost, it's not php nor html butdu smarty, I bo read the technical documentation I understood nothing to this system ..

Thank you for your help
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun Dec 31, 2017 9:11 pm    Post subject: Reply with quote

Smarty is just a way to prepare output, HTML output in your particular case, nothing more.
If you want a completely honest answer, your question has nothing to do with Smarty and is entirely off-topic on this forum.
Back to top
View user's profile Send private message
michael20fr
Smarty Rookie


Joined: 30 Dec 2017
Posts: 6

PostPosted: Sun Dec 31, 2017 9:14 pm    Post subject: Reply with quote

ok tanks
Back to top
View user's profile Send private message
michael20fr
Smarty Rookie


Joined: 30 Dec 2017
Posts: 6

PostPosted: Tue Jan 30, 2018 4:40 am    Post subject: Reply with quote

sorry to dig up the subject but I have questions and I am honest and especially I am a beginner in php programming so be cool with me. Here are my questions: I would like to know if this code is smarty? if so what should I search on Google for a smarty code example that explains how to cut this form into several stages of registration? if he give me at least in direction, an example of what I must do? a tutorial? thank you
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP