change "input" in register change "input" in register
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

change "input" in register

Started by rybosom, January 07, 2005, 10:09:50 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

rybosom

where can I change <input type="text"> in register for <input type="radio"> ?


Joachim Müller

in register.php (but this won't help you very much - you'll have to specify what excatly you want changed).

Joachim

rybosom

so, I want to change this


<input type="text" style="width: 100%" name="occupation" maxlength="255" value="" class="textinput">
               

to this:


Podaj swoja plec:
<input type="radio" name="plec" value="kobieta"> kobieta
<input type="radio" name="plec" value="mezczyzna"> mezczyzna








Joachim Müller

Edit register.php, findarray('input', 'occupation', $lang_register_php['occupation'], 255),and replace witharray('radio', 'occupation', $lang_register_php['occupation'], 'kobieta','mezczyzna'),

Find        case 'input' :
            if (isset($HTTP_POST_VARS[$element[1]])) {
                $value = $HTTP_POST_VARS[$element[1]];
            } else {
                $value = '';
            }
            echo <<<EOT
        <tr>
            <td width="40%" class="tableb"  height="25">
                        {$element[2]}
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="$value" class="textinput">
                </td>
        </tr>

EOT;
            break;
and add after it (in a new line)        case 'radio' :
            if (isset($_POST[$element[1]])) {
                $value = $_POST[$element[1]];
            } else {
                $value = '';
            }
            if ($element[2]) echo <<<EOT
        <tr>
            <td width="40%" class="tableb"  height="25">
                        {$element[2]}
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="radio" name="{$element[1]}" id="{$element[1]}1" value="{$element[3]}" class="radio" /><label for="{$element[1]}1" class="clickable_option">{$element[3]}</label>
                <input type="radio" name="{$element[1]}" id="{$element[1]}2" value="{$element[4]}" class="radio" /><label for="{$element[1]}2" class="clickable_option">{$element[4]}</label>
                </td>
        </tr>

EOT;
            break;
Please note that this will only have an impact on your registration form. You will have to modify profile.php and usermgr.php as well to make this consistent.

Joachim

rybosom

it's work! thanks! You're great!!!  ;D