This topic is locked
[SOLVED]

 add custom field to register page

6/16/2011 03:08:00
PHPRunner General questions
A
aclhkaclhk author

http://xlinesoft.com/phprunner/docs/add_custom_field_to_form.htm
Above manual describes how to add custom field to form. Is it support in register page ? Can I get the value by $_REQUEST["test"] in Register :Before process and Before Registration Events ?

C
cgphp 6/16/2011

The JavaScript OnLoad event is present so it should be supported. Try it! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=58874&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />

M
mickna 6/16/2011

aclhkaclhk,
I have a custom filed (checkbox for terms & Conditions).

  1. As my accept conditions is a Filed in my user table, I can insert this field in "Visual Editor => insert field" on Register page
    That's basically it. The value is insert in my table

    On the OnLoad event I set this field as Required.
    May this helps?

    mickna

L
Lena 6/16/2011

Hi,

http://xlinesoft.com...eld_to_form.htm

Above manual describes how to add custom field to form. Is it support in register page ? Can I get the value by $_REQUEST["test"] in Register :Before process and Before Registration Events ?


unfortunately it's not possible to add custom input on the register page in current PHPRunner 5.3
If you want send this issue to support@xlinesoft.com and we'll help with workaround.

M
mickna 6/16/2011

@Lena:
Why did a checkbox work on my register page?

http://demo.asprunner.net/michael_infinitevision_de/col03/register.php

A
aclhkaclhk author 6/16/2011



@Lena:
Why did a checkbox work on my register page?

http://demo.asprunner.net/michael_infinitevision_de/col03/register.php


Can you give me sample code how to get the value for check box and pass it to registration successfully event to proceed insert db. My version is PHPRunner 5.3

M
mickna 6/17/2011

@aclhkaclhk:
Have you tried the steps I posted in my first answer?

  1. You have the required field you want to fill out in your user table (e.g. "acceptRules", Type: TinyInt). With user table I mean the table, where you also store UserName and Passwd.
  2. Go to "Visual Editor" -> Place the cursor, where you want to show your custom Filed
  3. Insert Field -> "acceptRules", Edit as "Checkbox"
  4. If it should be required got to "Events" -> "Register page" -> "JavaScript OnLoad event"

    4a) var ctrl = Runner.getControl(pageid, 'acceptRules");

    ctrl.addValidation("IsRequired");


    That's it. I have no idea, if this also work with other fields as a checkbox, but why not...?
    Tell me, if this works for you.

    mickna