Adding custom fields to Admin object

Issues related to the Login tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/login_basics.html
http://www.wysiwygwebbuilder.com/login_tools.html

TIP:
A lot of information about the login tools can be found in the help/manual.
Also checkout the demo template that is include with the software.
Post Reply
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Adding custom fields to Admin object

Post by alex4orly »

I want to add a new field - A combo box with a few options
I tried using the : Collection->Option with the following code, this doesn't work...

<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo »

What exactly does not work?
What are your exact settings?
What is the result?
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Adding custom fields to Admin object

Post by alex4orly »

Please have a look at : http://www.nmaa-rc.org.au/admin3.php

It comes up as an empty frame, I tried changing the code to the following

<select name="extra3" size="1" id="Combobox1">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo »

Do you mean that the entire page does not work only because you have added this code?
In that case there must be an error in the PHP code somewhere.

I think it is helpful is you enabled PHP error reporting on the server so you can see where it stops working.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Adding custom fields to Admin object

Post by alex4orly »

There is a problem on that website, I am waiting for the host platform to get back to me.
In the meantime, I repeated my setup here : http://www.beleuramyhome.org.au/page4.php

I added one extra item into the collection with the following code:

<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>

When I run this page I get an error which I don't understand
Hope you can help me
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo »

I'm sorry I cannot find the specified page.
What do I need to do to see the the problem?
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Adding custom fields to Admin object

Post by alex4orly »

Please go to : http://www.beleuramyhome.org.au/
Then type at the continuation : page4.php
And you will get it

Thanks
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Adding custom fields to Admin object

Post by alex4orly »

The error is :
Parse error: syntax error, unexpected T_STRING in /home/bebe2839/public_html/loginadmin.php on line 497

In the script on that line there is :

case "<select name="cars">":

$selected[0] = "selected";
break;

case " <option value="volvo">Volvo</option>":

$selected[1] = "selected";
break;

case " <option value="saab">Saab</option>":

$selected[2] = "selected";
break;

case " <option value="fiat">Fiat</option>":

$selected[3] = "selected";
break;

case " <option value="audi">Audi</option>":

$selected[4] = "selected";
break;

case "</select>":

$selected[5] = "selected";
break;

case "":

$selected[6] = "selected";
break;
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo »

The code is invalid. This is not valid PHP code. Was this code generated by Web Builder?
If yes, then please share your project so I can see your settings.
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo »

Thanks for sending the project. Options should be added like this:
Volvo
Saab
Fiat
Audi
not with HTML code.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Adding custom fields to Admin object

Post by alex4orly »

Thanks, that works just fine
I wonder, how does WWB know I want a combobox....
Cheers
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo »

Because if you select 'options' this will automatically create a combobox.

From the help:
New fields can be of type' text', 'option' or 'checkbox'. A text field adds a standard editbox ,while the option fields adds a combobox to give the user multiple choices.
Post Reply