Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 + 7 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re:CODING: Support needed for coding index.php
by vinit on 2004/10/30 4:38:07

hmmm

Thanks Mith's

its working smoothly.
Re:CODING: Support needed for coding index.php
by Mithrandir on 2004/10/28 16:47:43

A simpler solution might be to add these fields to the required fields - however, that will only work if your users have javascript enabled.

le="color: #000000"><?php //line 140 $form->addElement($name_text); //change to $form->addElement($name_text, true);


for the name and

le="color: #000000"><?php //line 210: $form->addElement($bio_tarea); //change to $form->addElement($bio_tarea, true);

for the extra info
Re:CODING: Support needed for coding index.php
by vinit on 2004/10/28 16:32:40

stuck :(
No solution in hand as of now. And not being able to debug why the "header" is not comming.
Re: CODING: Support needed for coding index.php
by vinit on 2004/10/28 6:36:26

Looks like the code is ok but the result is not as expected.

edituser.php
Quote:

if (count($errors) > 0) {
include XOOPS_ROOT_PATH.'/header.php';
echo '<div>';
foreach ($errors as $er) {
echo '<span style="color: #ff0000; font-weight: bold;">'.$er.'</span><br />';
}
echo '</div><br />';
$op = 'editprofile';
} else {


The above post code works fine. When ever the Real name is blank or Extra info is blank it gives the relevant error message. Only problem is that the error message is not comming at the place where its expected. Rather the the first line of the html page contains the error message and then comes the code of the page. Where as i was expecting header to come first and then the error message. Given below is what i see as html source code once the page is generated

Quote:

<div><span style="color: #ff0000; font-weight: bold;">Real Name is missing</span><br /></div><br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


Some how the error message is comming before the header. Am i missing something here.. could you look into this please.
Thanks
Re: CODING: Support needed for coding index.php
by vinit on 2004/10/28 3:36:13

Thanks Mithrandir, it worked perfectly.

Now next thing thats needed is if user clicks on submit button on edituser.php without filling up the "Real Name" and "Extra Info" field than a proper error message has to be shown and should be redirected back to edituser.php.

i think this has to be done in edituser.php somewhere after line 52.

I thought of this, could you verify wether this is right or not

Quote:

if (empty($name) ) {
$errors[]=_US_EMPTYREALNAME;
}

if (empty($bio) ) {
$errors[]=_US_EMPTYEXTRAINFO;
}



Do let me know if i am wrong.

Who's Online

106 user(s) are online (49 user(s) are browsing Support Forums)


Members: 0


Guests: 106


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits