if that's what you suggest the problem is only one, will I have to pay if the plugin is released?
(because this might costume plugin)
first I was not good at expressing intent into English.
pity myself
um, I have no idea. Maybe someone will have mercy on you and make a very specific plugin that only you want for free. Anyway,closing this thread as it ISNT support.
Add an JS like this to the
member_register template just before </head>:
<script type="text/javascript">
$(document).ready(function() {
$('input[name="profile_fields[fidX]"').on('change', function() {
$('somelement').text($(this).val());
});
});
</script>
Change X in fidX to the profile field ID and somelelment to a class/ID of an element which should have the text.
@Leefish
whatever it is, thank you for willing to take the time to answer my thread. I appreciate your time.
@Destroy666
then what should I do after adding the javascript?
Nothing. If you changed what I said, it should work. Show what you pasted to your template and link to the registration page.
to be able to see immediate changes, I tried to register the position as the authenticated user and not as guests / visitors.
so you will not see the manifestation of this template if you visit my website as a guest.
I tried in the template
clone. This is the code in member_register
member_register
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->registration}</title>
{$headerinclude}
<script src="{$mybb->asset_url}/jscripts/validate/jquery.validate.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="{$mybb->asset_url}/jscripts/hendra.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('input[name="profile_fields[fid12]"').on('change', function() {
$('.jurusan').text($(this).val());
});
});
</script>
</head>
<body>
{$header}
<form action="member.php" method="post" id="registration_form">
<input type="text" style="visibility: hidden;" value="" name="regcheck1" /><input type="text" style="visibility: hidden;" value="true" name="regcheck2" />
{$regerrors}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->registration}</strong></td>
</tr>
<tr>
<td width="50%" class="trow1" valign="top">
<fieldset class="trow2">
<legend><strong>{$lang->account_details} </legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr>
<td colspan="2"><span class="smalltext"><label for="username">{$lang->username}</label></span></td>
</tr>
<tr>
<td colspan="2"><input type="text" class="textbox" name="username" id="username" style="width: 100%" value="{$username}" /></td>
</tr>
{$passboxes}
<tr>
<td width="50%" valign="top"><span class="smalltext"><label for="email">{$lang->email}</label></span></td>
<td width="50%" valign="top"><span class="smalltext"><label for="email2">{$lang->confirm_email}</label></span></td>
</tr>
<tr>
<td width="50%" valign="top"><input type="text" class="textbox" name="email" id="email" style="width: 100%" maxlength="50" value="{$email}" /></td>
<td width="50%" valign="top"><input type="text" class="textbox" name="email2" id="email2" style="width: 100%" maxlength="50" value="{$email2}" /></td>
</tr>
<tr>
<td colspan="2" style="display: none;" id="email_status"> </td>
</tr>
{$hiddencaptcha}
</table>
</fieldset>
<br />
<!-- kode unik -->
<fieldset class="trow2">
<legend><strong>Kode Unik Program</strong></legend>
<table cellspacing="0" cellpadding="5">
<!-- start: kode unik -->
<tbody><tr>
<td>
Kode Unik ini, didapatkan ketika anda memilih program kuliah yang anda pilih.
<br>
<span class="smalltext">Kode Unik Anda Adalah</span>
</td>
</tr>
<tr>
<td>
<strong style="color: red"><em>(Your Unique Account ID is : </em>
<form><input name="idpendaftaran" type="text" disabled id="{$post['fid12']}" value="" readonly></form>
<!--<form><input name="idpendaftaran" type="text" disabled id="idp" value="" readonly></form>-->
)</strong>
</td>
</tr>
<!-- end: kode unik -->
</tbody></table>
</fieldset>
<!-- kode unik -->
{$requiredfields}{$xt_proffields_reg_fields}
{$customfields}
{$referrer}
{$regimage}
{$questionbox}
</td>
<td width="50%" class="trow1" valign="top">
<fieldset class="trow2">
<legend><strong>{$lang->account_prefs}</strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="allownotices" id="allownotices" value="1" {$allownoticescheck} /></td>
<td valign="top"><span class="smalltext"><label for="allownotices">{$lang->allow_notices}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="hideemail" id="hideemail" value="1" {$hideemailcheck} /></td>
<td valign="top"><span class="smalltext"><label for="hideemail">{$lang->hide_email}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="receivepms" id="receivepms" value="1" {$receivepmscheck} /></td>
<td valign="top"><span class="smalltext"><label for="receivepms">{$lang->receive_pms}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="pmnotice" id="pmnotice" value="1"{$pmnoticecheck} /></td>
<td valign="top"><span class="smalltext"><label for="pmnotice">{$lang->pm_notice}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="pmnotify" id="pmnotify" value="1" {$pmnotifycheck} /></td>
<td valign="top"><span class="smalltext"><label for="pmnotify">{$lang->email_notify_newpm}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="invisible" id="invisible" value="1" {$invisiblecheck} /></td>
<td valign="top"><span class="smalltext"><label for="invisible">{$lang->invisible_mode}</label></span></td>
</tr>
<tr>
<td colspan="2"><span class="smalltext"><label for="subscriptionmethod">{$lang->subscription_method}</label></span></td>
</tr>
<tr>
<td colspan="2">
<select name="subscriptionmethod" id="subscriptionmethod">
<option value="0" {$no_auto_subscribe_selected}>{$lang->no_auto_subscribe}</option>
<option value="1" {$no_subscribe_selected}>{$lang->no_subscribe}</option>
<option value="2" {$instant_email_subscribe_selected}>{$lang->instant_email_subscribe}</option>
<option value="3" {$instant_pm_subscribe_selected}>{$lang->instant_pm_subscribe}</option>
</select>
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset class="trow2">
<legend><strong><label for="timezone">{$lang->time_offset}</label></strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr>
<td><span class="smalltext">{$lang->time_offset_desc}</span></td>
</tr>
<tr>
<td>{$tzselect}</td>
</tr>
<tr>
<td><span class="smalltext">{$lang->dst_correction}</span></td>
</tr>
<tr>
<td>
<select name="dstcorrection">
<option value="2" {$dst_auto_selected}>{$lang->dst_correction_auto}</option>
<option value="1" {$dst_enabled_selected}>{$lang->dst_correction_enabled}</option>
<option value="0" {$dst_disabled_selected}>{$lang->dst_correction_disabled}</option>
</select>
</td>
</tr>
</table>
</fieldset>
{$boardlanguage}
<!-- start: profile field -->
<fieldset class="trow2">
<legend><strong>Program Yang Dipilih</strong></legend>
<table cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td>
Program Yang Dipilih.
<br>
<span class="smalltext">{$xtpf['fid12']}</span>
</td>
</tr>
<!-- *************************
<SELECT name="jurusan" size="1" class="jurusan">
<OPTION VALUE="HTL">Perhotelan
<OPTION VALUE="KPL">Kapal Pesiar
<OPTION VALUE="AKS2B">Kapal Pesiar Akselerasi 2 Bulan
<OPTION VALUE="AKS2M">Kapal Pesiar Akselerasi 2 Minggu
<OPTION VALUE="iSPK">ISPeak
</SELECT>
<form><input name="idpendaftaran" type="text" disabled id="idp" value="" readonly></form>
************************* -->
</tbody></table>
</fieldset>
<!-- end: profile field -->
</td>
</tr>
</table>
<br />
<div align="center">
<input type="hidden" name="regtime" value="{$time}" />
<input type="hidden" name="step" value="registration" />
<input type="hidden" name="action" value="do_register" />
<input type="submit" class="button" name="regsubmit" value="{$lang->submit_registration}" />
</div>
</form>
<script type="text/javascript">
<!--
$().ready(function() {
// validate registration_form
$("#registration_form").validate({
rules: {
username: {
required: true,
minlength: {$mybb->settings['minnamelength']},
maxlength: {$mybb->settings['maxnamelength']},
remote:{
url: "xmlhttp.php?action=username_availability",
type: "post",
dataType: "json",
data:
{
my_post_key: my_post_key
},
},
},
email: {
required: true,
email: true,
},
email2: {
required: true,
email: true,
equalTo: "#email"
},
},
messages: {
username: {
minlength: "{$lang->js_validator_username_length}",
maxlength: "{$lang->js_validator_username_length}",
},
email: "{$lang->js_validator_invalid_email}",
email2: "{$lang->js_validator_email_match}",
}
});
{$validator_extra}
});
// -->
</script>
{$footer}
</body>
</html>
link:
http://forum.isp-education.ac.id/member....n=register
This is an example page link "automatic code" that will get the user when registering and taking the option.
http://forum.isp-education.ac.id/misc.php?page=generate
if you need a demo or admin login will I provide via pm.
You'd have to modify the JS code to generate the same codes as the PHP page you linked.
Can you explain what should I change (modify) ?
i apologize. but please do not give half-middle reply that made me even more confused.
I really hope these problems could soon be completed.
because my boss hung it to me. and he asked me to be resolved.
EDIT: nvm, found the script on the page.
As I said, you need to copy it to registration page:
// JavaScript Library : Jquery
// Created by [email protected]
// 6/12/2014
// Bikin Fungsi untuk mengambil tanggal sekarang
function GetTodayDate() {
var tdate = new Date();
var dd = tdate.getDate();
var MM = tdate.getMonth();
var yyyy = tdate.getFullYear();
var xxx = dd + "" +( MM+1) + "" + yyyy;
return xxx;
}
$(".jurusan").change(function(){ // Suruh jQuery mantau apakah class jurusan valuenya berubah ?
$kode = $(".jurusan").val(); // Ambil value dari class jurusan
$err_jurusan = "Cek Kembali Jurusan Anda";
$angkatan = "XIV"; // Static variable untuk angkatan 2014 dalam romawi
// Fix jika opsi dikembalikan dengan nilai null
if ($kode == ""){
$("#idp").val($err_jurusan);
}
else {
// Generate Kode Pendaftaran
$("#idp").val($kode + "-" + // Suruh jQuery untuk mengganti value dari id="idp (ID Pendaftaran)"
$angkatan + "-" + // Ambil value dari variabel angkatan
GetTodayDate() + "-" + // Mangil value dari fungsi GetTodayDate() diatas
Math.floor((Math.random() * 999)) // Bikin angka random dari 0 ~ 999
); // end of script :p, met berjuang :D
}
});
Then change .jurusan to
input[name="profile_fields[fid12]"] (if 12 is the correct ID) and #idp to the id/class of the element where the code should show up. Of course you have to add the element to the member_register template first, I don't see anything with jurusan class (which you tried to use) there.
nice one, i want that aswell but then with the themes of the website, man or female