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: 564
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Adding custom fields to Admin object

Post by alex4orly » Sun Apr 30, 2017 8:00 am

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: 19655
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo » Sun Apr 30, 2017 9:15 am

What exactly does not work?
What are your exact settings?
What is the result?

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

Re: Adding custom fields to Admin object

Post by alex4orly » Sun Apr 30, 2017 9:31 pm

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: 19655
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo » Mon May 01, 2017 6:39 am

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: 564
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Adding custom fields to Admin object

Post by alex4orly » Mon May 01, 2017 8:23 am

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: 19655
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo » Mon May 01, 2017 11:15 am

I'm sorry I cannot find the specified page.
What do I need to do to see the the problem?

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

Re: Adding custom fields to Admin object

Post by alex4orly » Mon May 01, 2017 11:42 am

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: 564
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Adding custom fields to Admin object

Post by alex4orly » Mon May 01, 2017 11:47 am

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: 19655
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo » Mon May 01, 2017 11:52 am

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: 19655
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo » Mon May 01, 2017 3:04 pm

Thanks for sending the project. Options should be added like this:
Volvo
Saab
Fiat
Audi
not with HTML code.

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

Re: Adding custom fields to Admin object

Post by alex4orly » Mon May 01, 2017 8:33 pm

Thanks, that works just fine
I wonder, how does WWB know I want a combobox....
Cheers

User avatar
Pablo
 
Posts: 19655
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Adding custom fields to Admin object

Post by Pablo » Mon May 01, 2017 8:36 pm

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

Who is online

Users browsing this forum: Google [Bot] and 1 guest