MyBB Hacks

Full Version: Key Fields are the same, but different results?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to create a table like the following.
[attachment=1158]

https://prnt.sc/i8h19b

which I want to ask, with the same input fields, but I want the result of the output field to be different. do i need to make more than one fields profile ?? or can I still use the same key fields?
If you want different input (data), mostly you need different input fields. If you want different outputs from the same input (data), you can try to modify the outputs.
(02-01-2018 11:11 PM)RateU Wrote: [ -> ]If you want different input (data), mostly you need different input fields. If you want different outputs from the same input (data), you can try to modify the outputs.

Quote:If you want different input (data), mostly you need different input fields

Yes, it is true Yipi. then what if the input is the same, the result is different? Erf

Quote:modify the outputs.
how to modify it?
Biggrin

I also have little trouble making the display responsive. but, this problem is enough to make me dizzy. therefore I would like to solve this first

please help me Biggrin


[attachment=1159]

loker_newthread template

PHP Code:
<html>
<head>
<title>{$lang->newthread_in}</title>
{$headerinclude}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/post.js?ver=1813"></script>

</head>
<body>
{$header}
{$preview}
{$thread_errors}
{$attacherror}
{$moderation_notice}
<form action="newthread.php?fid={$fid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<div class="tborder">

<div class="thead">{$lang->post_new_thread}</div>
{$loginbox}
<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">{$lang->thread_subject}</div>

<div class="formbit_field" data-width="80%">{$prefixselect}<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></div>
</div>
<!-- xthreads start -->
<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">Nama Perusahaan Loker</div>
{$tfinput['namaperusahaanaloker']}
</div>

<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">Jenis Perusahaan Loker</div>
{$tfinput['jenisperusahaanloker']}
</div>
    
<div style="overflow-x:auto;">
		<div class="trow1 rowbit">
			<div class="formbit_label align_right" data-width="20%">Posisi Loker</div>
			<div class="formbit_field" data-width="20%">{$tfinput['posisiperusahaanloker']}</div>
			<div>Tipe Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['tipeperusahaanloker']}</div>
			<div>Kuota Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['kuotaperusahaanloker']}</div>
		</div>

		<div class="trow1 rowbit">
			<div class="formbit_label align_right" data-width="20%">&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['posisiperusahaanloker']}</div>
			<div>Tipe Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['tipeperusahaanloker']}</div>
			<div>Kuota Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['kuotaperusahaanloker']}</div>
		</div>
		<div class="trow1 rowbit">
			<div class="formbit_label align_right" data-width="20%">&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['posisiperusahaanloker']}</div>
			<div>Tipe Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['tipeperusahaanloker']}</div>
			<div>Kuota Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['kuotaperusahaanloker']}</div>
		</div>
		<div class="trow1 rowbit">
			<div class="formbit_label align_right" data-width="20%">&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['posisiperusahaanloker']}</div>
			<div>Tipe Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['tipeperusahaanloker']}</div>
			<div>Kuota Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['kuotaperusahaanloker']}</div>
		</div>
		<div class="trow1 rowbit">
			<div class="formbit_label align_right" data-width="20%">&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['posisiperusahaanloker']}</div>
			<div>Tipe Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['tipeperusahaanloker']}</div>
			<div>Kuota Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['kuotaperusahaanloker']}</div>
		</div>
		<div class="trow1 rowbit">
			<div class="formbit_label align_right" data-width="20%">&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['posisiperusahaanloker']}</div>
			<div>Tipe Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['tipeperusahaanloker']}</div>
			<div>Kuota Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['kuotaperusahaanloker']}</div>
		</div>
</div>
<!-- isi -->

<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">Tanggal dan Bulan Loker</div>
<div class="formbit_field" data-width="80%">&nbsp;{$tfinput['tanggalloker']}&nbsp;{$tfinput['bulanloker']}&nbsp;{$tfinput['tahunloker']}</div>
</div>

<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">Gaji Perusahaan Loker</div>
<div class="formbit_field" data-width="5%">[Rp]</div>
<div class="formbit_field" data-width="35%">{$tfinput['gajiperusahaanloker']}</div>
<div class="formbit_field" data-width="40%">{$tfinput['terbilanggajiloker']}</div>
</div>

<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">Lokasi Kota dan Provinsi</div>
<div class="formbit_field" data-width="80%">{$tfinput['lokasikotaloker']}&nbsp;&nbsp;	{$tfinput['lokasiprovinsiloker']} </div>
</div>

<!-- xthreads end -->

{$posticons}
<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">{$lang->your_message}<br />{$smilieinserter}</div>
<div class="formbit_field" data-width="80%">
  
<textarea name="message" id="message" tabindex="2">{$message}</textarea>
{$codebuttons}
{$multiquote_external}
</div>
</div>
<div class="trow1 rowbit">
<div class="formbit_label align_right" data-width="20%">{$lang->post_options}</div>  
<div class="formbit_field" data-width="80%"><label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="7"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
{$disablesmilies}</div>
</div> 
{$modoptions}
{$subscriptionmethod}
{$pollbox}
{$captcha}
 </div>

{$attachbox}
  
<br />
<div class="align_center"><input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="5" />{$savedraftbutton}</div>
<input type="hidden" name="action" value="do_newthread" />
<input type="hidden" name="posthash" value="{$posthash}" />
<input type="hidden" name="attachmentaid" value="" />
<input type="hidden" name="attachmentact" value="" />
<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
<input type="hidden" name="tid" value="{$tid}" />
{$editdraftpid}
</form>
{$forumrules}
{$footer}
</body>
</html>

(02-02-2018 02:40 AM)terzier Wrote: [ -> ]then what if the input is the same, the result is different?

What is an example of the input (data) and the outputs you want?
the basis of this thread, I try to apply from this. but I try to develop a bit but have trouble

maybe the title of the thread is more precise, the results of the contents of the "Values List" are similar but with different results obtained from the same input (data) string

(02-02-2018 03:57 AM)RateU Wrote: [ -> ]What is an example of the input (data) and the outputs you want?

[attachment=1160]

Quote:1. Posisi Perusahaan Loker (key : posisiperusahaanloker)
Values List:

PHP Code:
[Pilih Salah Satu]
Tenaga Kependidikan
Tenaga kesehatan
Tenaga Teknis
Tenaga Administrasi
Tenaga Keamanan
Tenaga Kebersihan


2. Tipe Perusahaan Loker (key : tipeperusahaanloker)

PHP Code:
Values List:
Full Time
Part Time
Freelancer
Contract


3. Kuota Perusahaan Loker (key : kuotaperusahaanloker) *displays the number of labor quotas a company needs from the input fields data*


limitations of my language understanding that can cause a bit of a mistake. but hope you understand what I mean Tongue
(02-02-2018 01:05 PM)terzier Wrote: [ -> ]the results of the contents of the "Values List" are similar but with different results obtained from the same input (data) string

I'm sorry, but I still don't know what you want as the results. It is better if you provide an example of it (case example).
(02-03-2018 05:59 AM)RateU Wrote: [ -> ]
(02-02-2018 01:05 PM)terzier Wrote: [ -> ]the results of the contents of the "Values List" are similar but with different results obtained from the same input (data) string

I'm sorry, but I still don't know what you want as the results. It is better if you provide an example of it (case example).

(02-01-2018 11:11 PM)RateU Wrote: [ -> ]If you want different input (data), mostly you need different input fields. If you want different outputs from the same input (data), you can try to modify the outputs.

I think you understand what I mean. but it was difficult to communicate with language differences. then from that, I often difficulty and confused if I want to ask in mybb.com or in this forum

I just want to get different results from the same input field (different outputs from the same input (data) )
Quote:

PHP Code:
		<div class="trow1 rowbit">
			<div class="formbit_label align_right" data-width="20%">Posisi Loker</div>
			<div class="formbit_field" data-width="20%">{$tfinput['posisiperusahaanloker']}</div>
			<div>Tipe Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['tipeperusahaanloker']}</div>
			<div>Kuota Loker&nbsp;&nbsp;</div>
			<div class="formbit_field" data-width="20%">{$tfinput['kuotaperusahaanloker']}</div>
		</div>


the same input is

PHP Code:
{$tfinput['posisiperusahaanloker']}
{$tfinput['tipeperusahaanloker']}
{$tfinput['kuotaperusahaanloker']}


in this picture. in the Job Position option there is a value option. likewise, at the 2nd point and so on still in the same Job Position option, there is also the same value option

Similar results, when a user selects that option is:

PHP Code:
[Select one]
Tenaga Kependidikan
Tenaga kesehatan
Tenaga Teknis
Tenaga Administrasi
Tenaga Keamanan
Tenaga Kebersihan


[attachment=1161]
http://mybbhacks.zingaburga.com/attachment.php?aid=1158
http://mybbhacks.zingaburga.com/attachment.php?aid=1159

the question is, do I need to create different input fields to get the same result or can I modify the field only to get the same result? Erf

(02-01-2018 11:11 PM)RateU Wrote: [ -> ]... If you want different outputs from the same input (data), you can try to modify the outputs.
Oh, OK. I thing I understand what you mean.

In a short words: you need different thread fields.

In a long words:

Notice that I always use data after the input words?
Each row of Job Position - Job Type - Quota of Labor is a set of data. It means that each row may contains different set of data, even the data type is the same.

The same exact question is, why you need another textbox for the Company Name, Quota of Labor and the Salary while there is already a textbox for thread title (subject)?
Because you need different layouts? Nope, you can modify the layout or the appearance of them individually directly inside the newthread/editpost templates.
For example:

HTML Code
Subject: <input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
Company Name: <input type="text" class="textbox" name="subject" size="30" maxlength="85" value="{$subject}" tabindex="2" />
Quota of Labor: <input type="number" class="textbox" name="subject" size="5" maxlength="85" value="{$subject}" tabindex="3" />
Salary: <input type="text" class="textbox" name="subject" size="10" maxlength="85" value="{$subject}" tabindex="4" />

The answer is because you need different data.

I'm sorry for my lack of ability to understand what you mean.

Reference URL's