static registration-form?

16 years 5 months ago #50553 by gatekeeper
static registration-form? was created by gatekeeper
Hello all,


I´ve got a small or big problem.
A customer of mine really wants a special ajax form-validation in cb-registration-form.
I was browsing the whole cb-sript, but really don´t know where to start.
Is there a possibility to make a form with that needed validation and just lead it to cb-registration?
For example like this?

[code:1]<form action="www.stockwire.com/component/option,com_comprofiler/" method="post" id="adminForm" name="adminForm" onsubmit="return submitbutton(this)">
<table cellpadding="5" cellspacing="0" border="0" width="98%" class="contentpane" id="registrationTable">
<tr>
<td colspan="2" width="100%"><div class="componentheading"><font size="1">**You will need to confirm your e-mail address to activate your
account.</font></div></td>
</tr>
<tr>
<td class="titleCell">First Name:</td>
<td class="fieldCell"><input class="inputbox" type="text" size="40" mosReq="1" mosLabel="First Name" id="firstname" name="firstname" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />

</tr>
<tr>
<td class="titleCell">Last Name:</td>
<td class="fieldCell"><input class="inputbox" type="text" size="40" mosReq="1" mosLabel="Last Name" id="lastname" name="lastname" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />
</tr>

<tr>
<td class="titleCell">Username:</td>

<td class="fieldCell"><input type="text" id="username" name="username" autocomplete="off" mosReq="0" mosLabel="Username:" size="40" value="" class="inputbox" onblur="cbSendUsernameCheck(this);" onkeyup="if (this.value != cbLastUsername) { document.getElementById('usernameCheckResponse').innerHTML = ''; cbLastUsername = ''; }" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />
</tr>
<tr>
<td class="titleCell">&nbsp;</td>
<td class="fieldCell"><div id="usernameCheckResponse"></div>
</td>
</tr>

<tr>

<td class="titleCell">E-mail:</td>
<td class="fieldCell"><input type="text" id="email" name="email" mosReq="1" mosLabel="E-mail:" size="40" value="" class="inputbox" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />
</tr>


<tr>
<td class="titleCell">Password:</td>
<td class="fieldCell"><input class="inputbox" type="password" id="password" name="password" autocomplete="off" mosReq="0" mosLabel="Password:" size="40" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />

</tr>
<tr>
<td class="titleCell">Verify Password:</td>
<td class="fieldCell"><input class="inputbox" type="password" id="verifyPass" name="verifyPass" autocomplete="off" mosReq="0" mosLabel="Verify Password:" size="40" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />
</tr>

<tr id="cbfr_40">
<td class="titleCell">Address:</td> <td colspan="1" class="fieldCell"><input class="inputbox" mosReq="1" mosLabel="Address" size='40' type="text" name="address" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />

</tr>
<tr id="cbfr_35">
<td class="titleCell">City:</td> <td colspan="1" class="fieldCell"><input class="inputbox" mosReq="1" mosLabel="City" type="text" name="city" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />
</tr>
<tr id="cbfr_36">
<td class="titleCell">State:</td> <td colspan="1" class="fieldCell"><input class="inputbox" mosReq="1" mosLabel="State" size='3' maxlength='5' type="text" name="state" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />

</tr>
<tr id="cbfr_37">
<td class="titleCell">Zip Code:</td> <td colspan="1" class="fieldCell"><input class="inputbox" mosReq="1" mosLabel="Zip Code" size='13' type="text" name="zipcode" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />
</tr>
<tr id="cbfr_38">
<td class="titleCell">Country:</td> <td colspan="1" class="fieldCell"><input class="inputbox" mosReq="1" mosLabel="Country" size='13' type="text" name="country" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />

</tr>
<tr id="cbfr_43">
<td class="titleCell">Phone #:</td> <td colspan="1" class="fieldCell"><input class="inputbox" mosReq="1" mosLabel="Phone #" size='18' maxlength='18' type="text" name="phone" value="" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />
</tr>
<tr id="cbfr_54">
<td class="titleCell">How did you hear about us?:</td> <td colspan="1" class="fieldCell">

<select name="cb_howdidyoufindoutaboutstockwire[]" class="inputbox" size="0" mosReq="0" mosLabel="How did you hear about us?">
<option value=""> </option>
<option value="News Release">News Release</option>
<option value="Direct Mail">Direct Mail</option>
<option value="Google.com">Google.com</option>
<option value="Howard Stern">Howard Stern</option>
<option value="A Friend">A Friend</option>

<option value="Other">Other</option>
</select>
<span class='cbFieldIcons'></span></td>
</tr>
<tr>
<td class="titleCell"></td>
<td class="fieldCell"><img src="www.stockwire.com/index2.php?option=com_comprofiler&task=tabclass&Itemid=1&tab=getcaptchatab&no_html=1" />
<tr>
<td class="titleCell">Security Code Image Above:</td>
<td class="fieldCell"><input class="inputbox" type="text" name="captchacaptcha" mosReq="1" mosLabel="Security Code" value="" size="20" /><span class='cbFieldIcons'> <img src='www.stockwire.com/components/com_comprofiler/plugin/templates/luna/required.gif' width='16' height='16' alt='* This Field is required' title='This Field is required' />

<tr>
<td colspan="2" width="100%" class="contentpaneopen"><p><img src="components/com_comprofiler/plugin/templates/default/required.gif" width="16" height="16" /> &nbsp;Required Field<br>
<br>
Stockwire understands that users privacy is the key to our success. Please read our <a href="www.stockwire.com/index.php?option=com_content&task=view&id=21&Itemid=54">privacy policy.

</font></p>
</td>
</tr>

<tr>
<td colspan="2">
<input type="hidden" name="id" value="0" />
<input type="hidden" name="gid" value="0" />
<input type="hidden" name="emailpass" value="0" />
<input type="hidden" name="option" value="com_comprofiler" />
<input type="hidden" name="task" value="saveregisters" />
<input type="hidden" name="cbsecurityg1" value="cbm_3e7e0e0e_77bc8522_c020b530abd7d2f5b4a8df2893adaa37" />
<input type="hidden" name="cbrasitway" value="cbrv1_dac04f688bdf820594b8519be5631477_MiVnyjnLqi9tUpTu" />

<input type="submit" value="Send Registration" class="button" />
</td>
</tr>
</table>
</form>[/code:1]

And to this form put the needed validation?
Would be great to get a response, because I´m in really trouble of this.

Tahnks a lot in advance.

Sincerely,
Daniel

Please Log in to join the conversation.

16 years 5 months ago #50554 by beat
Replied by beat on topic Re:static registration-form?
Maybe the more complex-looking problem is in fact simpler to resolve...

What do you mean by "special ajax form-validation" and what do you need to validate ?

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 5 months ago #50556 by gatekeeper
Replied by gatekeeper on topic Re:static registration-form?
Hello beat,


for my customer I have to put this form-hints:

www.askthecssguy.com/examples/formfieldhints/example06.html

and this validation:

spreewaldhafen.evilmile.de/component/option,com_frontpage/Itemid,1/
Here push in the Topmenu the button "Kontakt".

So a variation of both of them.
Also should be sufficent just the hints+validation with green or red borders of form-elements after leaving input-filed.
I really was looking to the files but I guess there comes my knowledge to an end.
Really don´t know how to realize.


Best regards from Germany,
Daniel

Please Log in to join the conversation.

16 years 5 months ago #50559 by gatekeeper
Replied by gatekeeper on topic Re:static registration-form?
Hello again,


you see?
Thats what I´ve thought.
It´s just a bit complicated.
So would it be better to make a static reg-form, if it is possible?


Sincerely,
Daniel

Please Log in to join the conversation.

16 years 5 months ago #50560 by beat
Replied by beat on topic Re:static registration-form?
Nice-looking and non-obstrusive design, btw... B)
You may want to add something for accessibility. ;)

Well, for CB 1.1, you will need to either hack, or redo something static, as you said.

Hacking:

Hard way:
If you need hints only for names, usernames and password, easiest is to change the cb.core.php file...

If you need hints for all fields, it's in comprofiler.class.php.

Easy to find places searching for "getFieldIcons(" which displays the small "i"...That would be your alternate, cleaner, way: implement your nice hints a little different into getFieldIcons, which would replace the hints consistently accross the board. It would require an extra-parameter though... :)

Finally, static way, probably quickest: You will need to reproduce registerForm from comprofiler.php

Next CB will be handling fields a little differently, so it might help get this done easier, but that's probably at least a month away.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 5 months ago #50564 by gatekeeper
Replied by gatekeeper on topic Re:static registration-form?
Sorry,


I forgot tell you the fields reqiered to validate.
It´s about sleeping, didn´t got enough last time.
So, the needed fields are:

name, username, email, password+validation

and custom fields like:

adress, city, state, zip-code, country, phone


Maybe could get alone the standart-fields but custom = no chance.


Have a good night.
Sincerely,
Daniel

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.320 seconds

Facebook Twitter LinkedIn