Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
971 views
in Q2A Core by
Q2A version: 1.8
by
You'll probably need to add a JavaScript check for it (also need to modify server code)

1 Answer

+4 votes
by

You can do it with a simple custom plugin. 

First, go to admin -> users

Find, "Extra fields on user pages or registration form:"
do this: "Full name" -> edit field -> show on registration form

Then, create a custom plugin with only layer.php file. Plugin will have these files:

- qa-plugin.php

- my-layer.php

The qa-plugin.php should look like this:

<?php

if(!defined('QA_VERSION'))

{

header('Location: ../../');

exit;

}

// layer 

qa_register_plugin_layer('my-layer.php', 'my layer');

The my-layer.php file should look like this:

<?php

class qa_html_theme_layer extends qa_html_theme_base

{

public function form_field($field, $style) {

if ( $this->template == 'register' && $field['label'] == 'Full name:' ) {

$field['tags'] .= ' required';

}

qa_html_theme_base::form_field($field, $style);

}

This should work.

by
Thanks .....
by
Good explanation +1
by
Note this will only modify how it looks. It won't really make it required. You will need to reject the POST requests that don't contain that field
by
After add this, users image can not be seen. So any idea to fix this???
...